The Gaudi Framework  v41r0 (bdbe7744)
Loading...
Searching...
No Matches
GaudiKernel.ProcessJobOptions.LogFormatter Class Reference
Inheritance diagram for GaudiKernel.ProcessJobOptions.LogFormatter:
Collaboration diagram for GaudiKernel.ProcessJobOptions.LogFormatter:

Public Member Functions

 __init__ (self, fmt=None, datefmt=None, prefix="# ", with_time=False)
 format (self, record)

Public Attributes

 prefix = prefix
 with_time = with_time

Detailed Description

Definition at line 20 of file ProcessJobOptions.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 21 of file ProcessJobOptions.py.

21 def __init__(self, fmt=None, datefmt=None, prefix="# ", with_time=False):
22 logging.Formatter.__init__(self, fmt, datefmt)
23 self.prefix = prefix
24 self.with_time = with_time
25

Member Function Documentation

◆ format()

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

Definition at line 26 of file ProcessJobOptions.py.

26 def format(self, record):
27 fmsg = logging.Formatter.format(self, record)
28 prefix = self.prefix
29 if self.with_time:
30 prefix += f"{time.time():f} "
31 if record.levelno >= logging.WARNING:
32 prefix += record.levelname + ": "
33 s = "\n".join([prefix + line for line in fmsg.splitlines()])
34 return s
35
36
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition MsgStream.cpp:93

Member Data Documentation

◆ prefix

GaudiKernel.ProcessJobOptions.LogFormatter.prefix = prefix

Definition at line 23 of file ProcessJobOptions.py.

◆ with_time

GaudiKernel.ProcessJobOptions.LogFormatter.with_time = with_time

Definition at line 24 of file ProcessJobOptions.py.


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