| The Gaudi Framework v27r1

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

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

Public Member Functions | Public Attributes | List of all members
GaudiKernel.ProcessJobOptions.LogFormatter Class Reference
Inheritance diagram for GaudiKernel.ProcessJobOptions.LogFormatter:
[legend]
Collaboration diagram for GaudiKernel.ProcessJobOptions.LogFormatter:
[legend]

## Public Member Functions
def | __init__
def | format (self, record)

## Public Attributes
| prefix
| with_time

## Detailed Description

Definition at line 7 of file ProcessJobOptions.py.

## Constructor & Destructor Documentation

def GaudiKernel.ProcessJobOptions.LogFormatter.__init__ | ( |  | self,
|  |  | fmt = `None`,
|  |  | datefmt = `None`,
|  |  | prefix = `"# "`,
|  |  | with_time = `False`
| ) |  |

Definition at line 8 of file ProcessJobOptions.py.

8 def __init__(self, fmt=None, datefmt=None, prefix = "# ", with_time = False):
9 logging.Formatter.__init__(self, fmt, datefmt)
10 self.prefix = prefix
11 self.with_time = with_time
GaudiKernel.ProcessJobOptions.LogFormatter.with_time
with_time
Definition: ProcessJobOptions.py:11
GaudiKernel.ProcessJobOptions.LogFormatter.__init__
def __init__
Definition: ProcessJobOptions.py:8
GaudiKernel.ProcessJobOptions.LogFormatter.prefix
prefix
Definition: ProcessJobOptions.py:10

## Member Function Documentation

def GaudiKernel.ProcessJobOptions.LogFormatter.format | ( |  | self,
|  |  | record
| ) |  |

Definition at line 12 of file ProcessJobOptions.py.

12 def format(self, record):
13 fmsg = logging.Formatter.format(self, record)
14 prefix = self.prefix
15 if self.with_time:
16 prefix += '%f ' % time.time()
17 if record.levelno >= logging.WARNING:
18 prefix += record.levelname + ": "
19 s = "\n".join([ prefix + line
20 for line in fmsg.splitlines() ])
21 return s
22
GaudiKernel.ProcessJobOptions.LogFormatter.with_time
with_time
Definition: ProcessJobOptions.py:11
GaudiKernel.ProcessJobOptions.LogFormatter.prefix
prefix
Definition: ProcessJobOptions.py:10
GaudiKernel.ProcessJobOptions.LogFormatter.format
def format(self, record)
Definition: ProcessJobOptions.py:12

## Member Data Documentation

GaudiKernel.ProcessJobOptions.LogFormatter.prefix

Definition at line 10 of file ProcessJobOptions.py.

GaudiKernel.ProcessJobOptions.LogFormatter.with_time

Definition at line 11 of file ProcessJobOptions.py.

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

- GaudiKernel/python/GaudiKernel/ProcessJobOptions.py