pyemu.logger
module for logging pyemu progress
Module Contents
Classes
a basic class for logging events during the linear analysis calculations |
- class pyemu.logger.Logger(filename, echo=False)
Bases:
object
- a basic class for logging events during the linear analysis calculations
if filename is passed, then a file handle is opened.
- Parameters:
filename (str) – Filename to write logged events to. If False, no file will be created, and logged events will be displayed on standard out.
echo (bool) – Flag to cause logged events to be echoed to the screen.
- statement(phrase)
log a one-time statement
- Arg:
phrase (str): statement to log
- log(phrase)
log something that happened.
- Arg:
phrase (str): statement to log
Notes
- The first time phrase is passed the start time is saved.
The second time the phrase is logged, the elapsed time is written
- warn(message)
write a warning to the log file.
- Arg:
phrase (str): warning statement to log
- lraise(message)
log an exception, close the log file, then raise the exception
- Arg:
phrase (str): exception statement to log and raise