| The Gaudi Framework v32r1 (f65d50dc)

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__ (self, name="")
def | filter (self, record)
def | printOn (self, step=1, force=False)
def | printOff (self, step=1)
def | disable (self, allowed=logging.WARNING)
def | enable (self, allowed=logging.WARNING)

## Public Attributes
| printing_level
| enabled
| threshold

## Detailed Description

Definition at line 27 of file ProcessJobOptions.py.

## Constructor & Destructor Documentation

## ◆ __init__()

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

Definition at line 28 of file ProcessJobOptions.py.

28 def __init__(self, name=""):
29 logging.Filter.__init__(self, name)
30 self.printing_level = 0
31 self.enabled = True
32 self.threshold = logging.WARNING
33

## Member Function Documentation

## ◆ disable()

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

Definition at line 58 of file ProcessJobOptions.py.

58 def disable(self, allowed=logging.WARNING):
59 self.enabled = False
60 self.threshold = allowed
61

## ◆ enable()

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

Definition at line 62 of file ProcessJobOptions.py.

62 def enable(self, allowed=logging.WARNING):
63 self.enabled = True
64 self.threshold = allowed
65
66

## ◆ filter()

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

Definition at line 34 of file ProcessJobOptions.py.

34 def filter(self, record):
35 return record.levelno >= self.threshold or (self.enabled and
36 self.printing_level <= 0)
37

## ◆ printOff()

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

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

Definition at line 52 of file ProcessJobOptions.py.

52 def printOff(self, step=1):
53 """
54 Increase the printing_level of 'step' units. ( >0 means no print)
55 """
56 self.printing_level += step
57

## ◆ printOn()

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 38 of file ProcessJobOptions.py.

38 def printOn(self, step=1, force=False):
39 """
40 Decrease the printing_level of 'step' units. ( >0 means no print)
41 The level cannot go below 0, unless the force flag is set to True.
42 A negative value of the threshold disables subsequent "PrintOff"s.
43 """
44 if force:
45 self.printing_level -= step
46 else:
47 if self.printing_level > step:
48 self.printing_level -= step
49 else:
50 self.printing_level = 0
51

## Member Data Documentation

## ◆ enabled

GaudiKernel.ProcessJobOptions.LogFilter.enabled

Definition at line 31 of file ProcessJobOptions.py.

## ◆ printing_level

GaudiKernel.ProcessJobOptions.LogFilter.printing_level

Definition at line 30 of file ProcessJobOptions.py.

## ◆ threshold

GaudiKernel.ProcessJobOptions.LogFilter.threshold

Definition at line 32 of file ProcessJobOptions.py.

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

- GaudiKernel/python/GaudiKernel/ProcessJobOptions.py