schrodinger.application.matsci.qexsd.qespresso.utils.logger module¶
- schrodinger.application.matsci.qexsd.qespresso.utils.logger.set_logger(loglevel=1, logfile=None)[source]¶
Setup a basic logger with an handler and a formatter, using a corresponding numerical range [0..4], where a higher value means a more verbose logging. The loglevel value is mapped to correspondent logging module’s value:
LOG_CRIT=0 (syslog.h value is 2) ==> logging.CRITICAL LOG_ERR=1 (syslog.h value is 3) ==> logging.ERROR LOG_WARNING=2 (syslog.h value is 4) ==> logging.WARNING LOG_INFO=3 (syslog.h value is 6) ==> logging.INFO LOG_DEBUG=4 (syslog.h value is 7) ==> logging.DEBUG
If a logfile name is passed then writes logs to file, instead of send logs to the standard output.
- Parameters
loglevel – Simplified POSIX’s syslog like logging level index
logfile – Logfile name for non-scripts runs