| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
GaudiKernel.ProcessJobOptions.LogFilter Class Reference
Inheritance diagram for GaudiKernel.ProcessJobOptions.LogFilter:
[legend]
Collaboration diagram for GaudiKernel.ProcessJobOptions.LogFilter:
[legend]

## 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 GaudiKernel.ProcessJobOptions.LogFilter.__init__ | ( |  | self,
|  |  | name = `""`
| ) |  |

Definition at line 20 of file ProcessJobOptions.py.

20
21 def __init__(self, name = ""):
22 logging.Filter.__init__(self, name)
23 self.printing_level = 0
24 self.enabled = True
self.threshold = logging.WARNING

## Member Function Documentation

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

Definition at line 45 of file ProcessJobOptions.py.

45
46 def disable(self, allowed = logging.WARNING):
47 self.enabled = False
self.threshold = allowed

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

Definition at line 48 of file ProcessJobOptions.py.

48
49 def enable(self, allowed = logging.WARNING):
50 self.enabled = True
51 self.threshold = allowed

def GaudiKernel.ProcessJobOptions.LogFilter.filter | ( |  | self,
|  |  | record
| ) |  |

Definition at line 25 of file ProcessJobOptions.py.

25
26 def filter(self, record):
return record.levelno >= self.threshold or (self.enabled and self.printing_level <= 0)

def GaudiKernel.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.

40
41 def printOff(self, step = 1):
42 """
43 Increase the printing_level of 'step' units. ( >0 means no print)
44 """
self.printing_level += step

def GaudiKernel.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.

27
28 def printOn(self, step = 1, force = False):
29 """
30 Decrease the printing_level of 'step' units. ( >0 means no print)
31 The level cannot go below 0, unless the force flag is set to True.
32 A negative value of the threshold disables subsequent "PrintOff"s.
33 """
34 if force:
35 self.printing_level -= step
36 else:
37 if self.printing_level > step:
38 self.printing_level -= step
39 else:
self.printing_level = 0

## Member Data Documentation

GaudiKernel.ProcessJobOptions.LogFilter.enabled

Definition at line 23 of file ProcessJobOptions.py.

GaudiKernel.ProcessJobOptions.LogFilter.printing_level

Definition at line 22 of file ProcessJobOptions.py.

GaudiKernel.ProcessJobOptions.LogFilter.threshold

Definition at line 24 of file ProcessJobOptions.py.

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

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