Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Private Member Functions
distutils.log.Log Class Reference

List of all members.

Public Member Functions

def __init__
def log
def debug
def info
def warn
def error
def fatal

Public Attributes

 threshold

Private Member Functions

def _log

Detailed Description

Definition at line 14 of file log.py.


Constructor & Destructor Documentation

def distutils.log.Log.__init__ (   self,
  threshold = WARN 
)

Definition at line 16 of file log.py.

00016 
00017     def __init__(self, threshold=WARN):
00018         self.threshold = threshold

Here is the caller graph for this function:


Member Function Documentation

def distutils.log.Log._log (   self,
  level,
  msg,
  args 
) [private]

Definition at line 19 of file log.py.

00019 
00020     def _log(self, level, msg, args):
00021         if level not in (DEBUG, INFO, WARN, ERROR, FATAL):
00022             raise ValueError('%s wrong log level' % str(level))
00023 
00024         if level >= self.threshold:
00025             if args:
00026                 msg = msg % args
00027             if level in (WARN, ERROR, FATAL):
00028                 stream = sys.stderr
00029             else:
00030                 stream = sys.stdout
00031             if stream.errors == 'strict':
00032                 # emulate backslashreplace error handler
00033                 encoding = stream.encoding
00034                 msg = msg.encode(encoding, "backslashreplace").decode(encoding)
00035             stream.write('%s\n' % msg)
00036             stream.flush()

Here is the call graph for this function:

Here is the caller graph for this function:

def distutils.log.Log.debug (   self,
  msg,
  args 
)

Definition at line 40 of file log.py.

00040 
00041     def debug(self, msg, *args):
00042         self._log(DEBUG, msg, args)

Here is the call graph for this function:

Here is the caller graph for this function:

def distutils.log.Log.error (   self,
  msg,
  args 
)

Definition at line 49 of file log.py.

00049 
00050     def error(self, msg, *args):
00051         self._log(ERROR, msg, args)

Here is the call graph for this function:

Here is the caller graph for this function:

def distutils.log.Log.fatal (   self,
  msg,
  args 
)

Definition at line 52 of file log.py.

00052 
00053     def fatal(self, msg, *args):
00054         self._log(FATAL, msg, args)

Here is the call graph for this function:

def distutils.log.Log.info (   self,
  msg,
  args 
)

Definition at line 43 of file log.py.

00043 
00044     def info(self, msg, *args):
00045         self._log(INFO, msg, args)

Here is the call graph for this function:

Here is the caller graph for this function:

def distutils.log.Log.log (   self,
  level,
  msg,
  args 
)

Definition at line 37 of file log.py.

00037 
00038     def log(self, level, msg, *args):
00039         self._log(level, msg, args)

Here is the call graph for this function:

Here is the caller graph for this function:

def distutils.log.Log.warn (   self,
  msg,
  args 
)

Definition at line 46 of file log.py.

00046 
00047     def warn(self, msg, *args):
00048         self._log(WARN, msg, args)

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 17 of file log.py.


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