logger
Defined in module: pressio4py.logger
Import as: from pressio4py import logger
Overview
By default, for performance reasons, the logger is disabled, so pressio4py will not output anything.
To enable logging, you need to do two things:
- initialize the logger and (if needed) change the verbosity level
- finalize the logger
Usage
The following snippet provides the main idea:
from pressio4py import logger if __name__ == '__main__': logger.initialize(logger.logto.terminal) logger.setVerbosity([logger.loglevel.info]) # your code logger.finalize()
Levels
loglevel.trace loglevel.debug loglevel.info loglevel.warn loglevel.error loglevel.critical loglevel.off