Package warn :: Class Warn
[hide private]
[frames] | no frames]

Class Warn

source code

Instance Methods [hide private]
 
__init__(self, name, outfile=None, filename=None, logtype=None)
Creates a Warn object.
source code
 
write(self, string)
Output for loggin, append the current time, the name of the log, and the pid
source code
 
_write(self, string)
Direct write to the output
source code
 
debug(self, *args)
Shows the args on the stderr
source code
 
log(self, *args)
Shows the args on a log
source code
 
warn(self, *args)
Shows |args| as warning, and print the last exception catched
source code
 
stack(self, *args)
Shows |args| as warning, and print the stack of current caller
source code
 
halt(self, *args)
Displays |args|, print the last_exception and exits with code 127
source code
Class Variables [hide private]
  LOG_SYSLOG = 1
  LOG_FILE = 2
  LOG_STDERR = 3
  output = {'PID 22635': <epydoc.docintrospecter._DevNull instan...
Method Details [hide private]

__init__(self, name, outfile=None, filename=None, logtype=None)
(Constructor)

source code 

Creates a Warn object. Warn objects provide useful tools to show errors and warnings. |name| The name of the warn object |outfile| An output object in case that you have a default output. If None, a file will be created |logtype| If it must use syslog. If none it uses output to file. Possible values are: Warn.LOG_FILE, Warn.LOG_SYSLOG, Warn.LOG_STDERR Default: LOG_STDERR If LOG_FILE is specified the constructor needs any of the following keyword arguments: filename='filename-to-output' or outfile=fileobject

NOTE: If output already has a handler, this handler is used overriding any of the opening instructions. In order to override, you need to modify the handler (using warn.output) directly

Class Variable Details [hide private]

output

Value:
{}