Package nMOLDYN :: Package Core :: Module Logger |
[hide private]
[frames] | no frames]

# Module Logger

source code

    This module implements the classes used to handle the nMOLDYN logger.

    Classes:
        * LogToGUI     : sets up a GUI logger.
        * LogToFile    : sets up a file logger.
        * LogToConsole : sets up a console logger.

    Procedures:
        * LogMessage   : displays a logging message of a specified logging level to the specified logger(s).

Classes | [hide private]
| LogToGUI Sets up a GUI handler for the nMOLDYN logger.
| LogToFile Sets up a file logger.
| LogToConsole Sets up a console logger.

Functions | [hide private]
LogMessage(level='debug', message='', media=['gui','file','console']) Displays the logging messahe |message| of logging level |level| to the logger(s) |media|. | source code

Variables | [hide private]
| LEVELS = `{'debug': logging.DEBUG, 'info': logging.INFO, 'warni`...``
| FILE_LOGGER = `logging.getLogger('NMOLDYN LOGFILE')`
| CONSOLE_LOGGER = `logging.getLogger('NMOLDYN CONSOLE')`
| GUI_LOGGER = `logging.getLogger('NMOLDYN GUI')`

Function Details | [hide private]

### LogMessage(level='debug', message='', media=['gui','file','console']) | source code
Displays the logging messahe |message| of logging level |level| to the logger(s) |media|. Parameters: `level` (string) - a string being one of 'debug', 'info', 'warning', 'error' or 'critical' specifying the logging level of the logging message. Will change the way the logging message will be displayed. `message` (string) - the logging message. `media` (list) - a list containing 'gui' and/or 'file' and/or 'console' specifying on which logger(s) the logging message should emitted.

Variables Details | [hide private]

  ### LEVELS Value:
      {'debug': logging.DEBUG, 'info': logging.INFO, 'warning': logging.WARN
      ING, 'error': logging.ERROR, 'critical': logging.CRITICAL}