| # Gaudi Framework, version v22r2 |

Home |  | Generated: Tue May 10 2011

Public Member Functions | Public Attributes

# ProcessJobOptions::LogFilter Class Reference

List of all members.

## Public Member Functions
def | __init__
def | filter
def | printOn
def | printOff
def | disable
def | enable
## Public Attributes
| printing_level
| enabled
| threshold

## Detailed Description

Definition at line 19 of file ProcessJobOptions.py.

## Constructor & Destructor Documentation

def ProcessJobOptions::LogFilter::__init__ | ( |  | self,
|  |  | name = `""`
| ) |  |

Definition at line 20 of file ProcessJobOptions.py.

    00021                                  :
    00022         logging.Filter.__init__(self, name)
    00023         self.printing_level = 0
    00024         self.enabled = True
            self.threshold = logging.WARNING

## Member Function Documentation

def ProcessJobOptions::LogFilter::disable | ( |  | self,
|  |  | allowed = `logging.WARNING`
| ) |  |

Definition at line 45 of file ProcessJobOptions.py.

    00046                                                 :
    00047         self.enabled = False
            self.threshold = allowed

def ProcessJobOptions::LogFilter::enable | ( |  | self,
|  |  | allowed = `logging.WARNING`
| ) |  |

Definition at line 48 of file ProcessJobOptions.py.

    00049                                                :
    00050         self.enabled = True
    00051         self.threshold = allowed

def ProcessJobOptions::LogFilter::filter | ( |  | self,
|  |  | record
| ) |  |

Definition at line 25 of file ProcessJobOptions.py.

    00026                             :
            return record.levelno >= self.threshold or (self.enabled and self.printing_level <= 0)

def ProcessJobOptions::LogFilter::printOff | ( |  | self,
|  |  | step = `1`
| ) |  |

    Increase the printing_level of 'step' units. ( >0 means no print)

Definition at line 40 of file ProcessJobOptions.py.

    00041                                 :
    00042         """
    00043         Increase the printing_level of 'step' units. ( >0 means no print)
    00044         """
            self.printing_level += step

def ProcessJobOptions::LogFilter::printOn | ( |  | self,
|  |  | step = `1`,
|  |  | force = `False`
| ) |  |

    Decrease the printing_level of 'step' units. ( >0 means no print)
    The level cannot go below 0, unless the force flag is set to True.
    A negative value of the threshold disables subsequent "PrintOff"s.

Definition at line 27 of file ProcessJobOptions.py.

    00028                                               :
    00029         """
    00030         Decrease the printing_level of 'step' units. ( >0 means no print)
    00031         The level cannot go below 0, unless the force flag is set to True.
    00032         A negative value of the threshold disables subsequent "PrintOff"s.
    00033         """
    00034         if force:
    00035             self.printing_level -= step
    00036         else:
    00037             if self.printing_level > step:
    00038                 self.printing_level -= step
    00039             else:
                    self.printing_level = 0

## Member Data Documentation

ProcessJobOptions::LogFilter::enabled

Definition at line 20 of file ProcessJobOptions.py.

ProcessJobOptions::LogFilter::printing_level

Definition at line 20 of file ProcessJobOptions.py.

ProcessJobOptions::LogFilter::threshold

Definition at line 20 of file ProcessJobOptions.py.

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

- /afs/.cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v22r2/GaudiKernel/python/GaudiKernel/ProcessJobOptions.py

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines