logger
module for logging pyemu progress
Logger
Bases: object
a basic class for logging events during the linear analysis calculations if filename is passed, then a file handle is opened.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
`str`
|
Filename to write logged events to. If False, no file will be created, and logged events will be displayed on standard out. |
required |
echo
|
`bool`
|
Flag to cause logged events to be echoed to the screen. |
False
|
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
lraise(message)
log an exception, close the log file, then raise the exception
Arg
phrase (str): exception statement to log and raise
statement(phrase)
log a one-time statement
Arg
phrase (str): statement to log
warn(message)
write a warning to the log file.
Arg
phrase (str): warning statement to log