Back to index

python3.2  3.2.2
Classes | Functions | Variables
distutils.log Namespace Reference

Classes

class  Log

Functions

def set_threshold
def set_verbosity

Variables

int DEBUG = 1
int INFO = 2
int WARN = 3
int ERROR = 4
int FATAL = 5
tuple _global_log = Log()
 log = _global_log.log
 debug = _global_log.debug
 info = _global_log.info
 warn = _global_log.warn
 error = _global_log.error
 fatal = _global_log.fatal

Detailed Description

A simple log mechanism styled after PEP 282.

Function Documentation

def distutils.log.set_threshold (   level)

Definition at line 63 of file log.py.

00063 
00064 def set_threshold(level):
00065     # return the old threshold for use from tests
00066     old = _global_log.threshold
00067     _global_log.threshold = level
00068     return old

Here is the caller graph for this function:

Definition at line 69 of file log.py.

00069 
00070 def set_verbosity(v):
00071     if v <= 0:
00072         set_threshold(WARN)
00073     elif v == 1:
00074         set_threshold(INFO)
00075     elif v >= 2:
00076         set_threshold(DEBUG)

Here is the call graph for this function:


Variable Documentation

Definition at line 55 of file log.py.

Definition at line 6 of file log.py.

Definition at line 57 of file log.py.

Definition at line 9 of file log.py.

Definition at line 60 of file log.py.

Definition at line 10 of file log.py.

distutils.log.fatal = _global_log.fatal

Definition at line 61 of file log.py.

Definition at line 7 of file log.py.

Definition at line 58 of file log.py.

distutils.log.log = _global_log.log

Definition at line 56 of file log.py.

Definition at line 8 of file log.py.

distutils.log.warn = _global_log.warn

Definition at line 59 of file log.py.