Package gromacs :: Module log'
[hide private]
[frames] | no frames]

Module log'

source code

:mod:`gromacs.log` -- setting up logging

Configure logging for gromacs. Import this module if logging is desired in application code.

Logging to a file and the console.

See http://docs.python.org/library/logging.html?#logging-to-multiple-destinations

The top level logger of the library is named 'gromacs'. Note that we are configuring this logger with console output. If the root logger also does this then we will get two output lines to the console. We'll live with this because this is a simple convenience library and most people will not bother with a logger (I think...)

In modules that use loggers get a logger like so:

    import logging
    logger = logging.getLogger('gromacs.MODULENAME')
Classes [hide private]
  NullHandler
Silent Handler.
Functions [hide private]
 
clear_handlers(logger)
clean out handlers in the library top level logger
source code
 
create(logger_name, logfile='edPDB.log')
Create a top level logger.
source code
Function Details [hide private]

clear_handlers(logger)

source code 

clean out handlers in the library top level logger

(only important for reload/debug cycles...)

create(logger_name, logfile='edPDB.log')

source code 
Create a top level logger.

- The file logger logs everything (including DEBUG).
- The console logger only logs INFO and above.

Logging to a file and the console.

See http://docs.python.org/library/logging.html?#logging-to-multiple-destinations

The top level logger of the library is named 'edPDB'.  Note that
we are configuring this logger with console output. If the root
logger also does this then we will get two output lines to the
console. We'll live with this because this is a simple
convenience library...