_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

def __init__ (   self  ) 

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 
)

write to file

Definition at line 110 of file Logger.py.

def get_slimvars (   self  ) 

Definition at line 119 of file Logger.py.

def set_default_log (   self,
  verb,
  logname 
)

Definition at line 135 of file Logger.py.

def log_open (   self,
  logname 
)

Definition at line 155 of file Logger.py.

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]

Definition at line 46 of file Logger.py.

tuple env = InstanceManager() [static]

Definition at line 47 of file Logger.py.

Definition at line 65 of file Logger.py.

Definition at line 92 of file Logger.py.

Definition at line 104 of file Logger.py.


The documentation for this class was generated from the following file:

Generated on Sun Aug 10 09:11:12 2008 for SLIMpy by  doxygen 1.5.6