_Log Class Reference
log object is used by all of slimpy to coordinate output suggested use: alog =
log() print >>alog, "logging somthing" to print unconditionally or: print >>alog(3), "logging somthing" to print only of verbosity is above 3
More...
List of all members.
|
Public Member Functions |
def | __init__ |
| singleton instance
|
def | init |
| init is for internal use only.
|
def | setVerbose |
| set verbosity level
|
def | setLogFile |
def | setNullOut |
| set where the null out points to this is so the log can discriminate what output it will print
|
def | write |
| write to file
|
def | get_slimvars |
def | set_default_log |
def | log_open |
def | __call__ |
| used like print >> log(3,'solver') which will print if the current verbosity is greater than or eual to 3 or the debug variable is set to 'solver'
|
def | abridge |
| uses the global dict variable 'abridgeMap' in SLIMGlobals to replace all of the ocurrences of each key with the value this is helpful in reducing the amount of garbage input for examle in the simple1 tutorial I replace each $RSFROOT path with ''
|
Public Attributes |
| verbose |
| logFile |
| nullOut |
Static Public Attributes |
string | name = "log" |
tuple | env = InstanceManager() |
Detailed Description
log object is used by all of slimpy to coordinate output suggested use: alog =
log() print >>alog, "logging somthing" to print unconditionally or: print >>alog(3), "logging somthing" to print only of verbosity is above 3
Definition at line 44 of file Logger.py.
Member Function Documentation
singleton instance
Definition at line 55 of file Logger.py.
def init |
( |
|
self, |
|
|
|
lfile = stderr , |
|
|
|
nullout = NULLOUT , |
|
|
|
verbose = 1 | |
|
) |
| | |
init is for internal use only.
use setter funtions to promote consistancy.
Definition at line 64 of file Logger.py.
def setVerbose |
( |
|
self, |
|
|
|
verb | |
|
) |
| | |
set verbosity level
Definition at line 73 of file Logger.py.
def setLogFile |
( |
|
self, |
|
|
|
lfile | |
|
) |
| | |
- Parameters:
-
| lfile | must have a write method |
Definition at line 80 of file Logger.py.
def setNullOut |
( |
|
self, |
|
|
|
no | |
|
) |
| | |
set where the null out points to this is so the log can discriminate what output it will print
Definition at line 99 of file Logger.py.
def write |
( |
|
self, |
|
|
|
string | |
|
) |
| | |
def get_slimvars |
( |
|
self |
) |
|
def set_default_log |
( |
|
self, |
|
|
|
verb, |
|
|
|
logname | |
|
) |
| | |
def log_open |
( |
|
self, |
|
|
|
logname | |
|
) |
| | |
def __call__ |
( |
|
self, |
|
|
|
lval, |
|
|
|
debug = None | |
|
) |
| | |
used like print >> log(3,'solver') which will print if the current verbosity is greater than or eual to 3 or the debug variable is set to 'solver'
Definition at line 177 of file Logger.py.
def abridge |
( |
|
self, |
|
|
|
string | |
|
) |
| | |
uses the global dict variable 'abridgeMap' in SLIMGlobals to replace all of the ocurrences of each key with the value this is helpful in reducing the amount of garbage input for examle in the simple1 tutorial I replace each $RSFROOT path with ''
Definition at line 212 of file Logger.py.
Member Data Documentation
string name = "log" [static] |
The documentation for this class was generated from the following file:
- /Users/sean/workspace/SLIMpy3/slimpy_base/utils/Logger.py