class_docstr: Logger to be used by all applications and classes.
  
  Notes
  -----
  Singleton class i.e. setting the log level changes the output globally.
  
  Examples
  --------
  Initializing the logger
  
  >>> from medpy.core import Logger
  >>> logger = Logger.getInstance()
  
  Error messages are passed to stdout
  
  >>> logger.error('error message')
  15.09.2014 12:40:25 [ERROR   ] error message
  >>> logger.error('critical message')
  15.09.2014 12:40:42 [CRITICAL] critical message
  
  But debug and info messages are suppressed
  
  >>> logger.info('info message')
  >>> logger.debug('debug message')
  
  Unless the log level is set accordingly
  
  >>> import logging
  >>> logger.setLevel(logging.DEBUG)
  
  >>> logger.info('info message')
  15.09.2014 12:43:06 [INFO    ] info message (in <ipython-input-14-a08cad56519d>.<module>:1)
  >>> logger.debug('debug message')
  15.09.2014 12:42:50 [DEBUG   ] debug message (in <ipython-input-13-3bb0c512b560>.<module>:1)
      
docstr: Replace the current handler with a new one.
  
  Parameters
  ----------
  hdlr : logging.Handler
      A subclass of Handler that should used to handle the logging output. 
  
  Notes
  -----
  If none should be replaces, but just one added, use the parent classes
  addHandler() method.
docstr_tok: ["Replace","the","current","handler","with","a","new","one",".","Parameters","--","--","--","--","--","hdlr",":","logging.Handler","A","subclass","of","Handler","that","should","used","to","handle","the","logging","output",".","Notes","--","--","-","If","none","should","be","replaces",",","but","just","one","added",",","use","the","parent","classes","addHandler","(",")","method","."]
code: def setHandler(self, hdlr):
      r"""Replace the current handler with a new one.
  
      Parameters
      ----------
      hdlr : logging.Handler
          A subclass of Handler that should used to handle the logging output.
  
      Notes
      -----
      If none should be replaces, but just one added, use the parent classes
      addHandler() method.
      """
      if None != self._handler:
          self.removeHandler(self._handler)
      self._handler = hdlr
      self.addHandler(self._handler)
  
file_path: medpy/medpy/core/logger.py
imports: import sys
  import logging
  from logging import Logger
label_desc: Use image node_id 2 for calling the Logger obj's underlying member method code with example usage: obj.setHandler(hdlr) without return types