Opened 17 years ago
Last modified 16 years ago
#309 closed enhancement
Consider replacing print statements by logging — at Version 2
Reported by: | ole | Owned by: | rwilson |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | Other | Version: | |
Severity: | normal | Keywords: | |
Cc: |
Description (last modified by )
A good idea suggested by several people.
Change History (2)
comment:1 Changed 17 years ago by
Type: | defect → enhancement |
---|
comment:2 Changed 16 years ago by
Description: | modified (diff) |
---|---|
Status: | new → assigned |
Note: See
TracTickets for help on using
tickets.
A simple module to cater for ANUGA logging has been written at anuga_core/utilities/log.py.
This allows logging to the screen and a logfile, with different loglevels for the screen and logfile. The logfile logging level is forced to be at a lower or equal logging level that that used for the screen, ensuring that anything logged to the screen also goes into the logfile.
An attempt has been made to also write the calling module name and linenumber into the logfile. This only works under python 2.5 or later and fails silently if running earlier versions. This feature works in the test case, but gives wrong information in the real code.