The Gaudi Framework  v36r6 (b1ee9983)
GaudiKernel.ProcessJobOptions.LogFormatter Class Reference
Inheritance diagram for GaudiKernel.ProcessJobOptions.LogFormatter:
Collaboration diagram for GaudiKernel.ProcessJobOptions.LogFormatter:

Public Member Functions

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

Public Attributes

 prefix
 
 with_time
 

Detailed Description

Definition at line 20 of file ProcessJobOptions.py.

Constructor & Destructor Documentation

◆ __init__()

def 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()

def 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()
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 

Member Data Documentation

◆ prefix

GaudiKernel.ProcessJobOptions.LogFormatter.prefix

Definition at line 23 of file ProcessJobOptions.py.

◆ with_time

GaudiKernel.ProcessJobOptions.LogFormatter.with_time

Definition at line 24 of file ProcessJobOptions.py.


The documentation for this class was generated from the following file:
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:119