Table of Contents

Module: log misc/log.py

Event logger

Functions   
BUG
ERROR
FATAL
INFO
NOTE
UNKARG
WARNING
  BUG 
BUG (
        s,
        exit=None,
        severity=SEV_BUG,
        name=None,
        terminal=1,
        crash=1,
        )

Register a BUG event (severity 2). For parameters see ERROR

if crash==1, and exit is None, the program will generate a stack trace.

Exceptions   
BugTrap( s )
  ERROR 
ERROR (
        s,
        exit=None,
        severity=SEV_ERROR,
        name=None,
        terminal=1,
        )

Register an ERROR event (severity 4).

parameters:

s

the string of the error message.

exit

if not None, this routine does not return, but exits with the given exit status.

severity

do not touch.

name

the name of the module where the error occurred

terminal

if 1, the error is logged to the terminal too.

  FATAL 
FATAL (
        s,
        exit=1,
        severity=SEV_CRIT,
        name=None,
        terminal=1,
        )

Register a FATAL event (severity 3). For parameters see ERROR

  INFO 
INFO (
        s,
        exit=None,
        severity=SEV_INFO,
        name=None,
        terminal=1,
        )

Register an INFO event (severity 7). For parameters see ERROR

  NOTE 
NOTE (
        s,
        exit=None,
        severity=SEV_NOTICE,
        name=None,
        terminal=1,
        )

Register a NOTE event (severity 6). For parameters see ERROR

  UNKARG 
UNKARG ( argname,  extratext=None )

Special case of WARNING, to be used for unknown command line arguments.

  WARNING 
WARNING (
        s,
        exit=None,
        severity=SEV_WARNING,
        name=None,
        terminal=1,
        )

Register a WARNING event (severity 5). For parameters see ERROR

Classes   
BugTrap

Exception that can be raised by the BUG function

Log

Class used to access the log file, and write events there.


Table of Contents

This document was automatically generated on Fri Jul 3 09:28:36 2009 by HappyDoc version WORKING