LSSTApplications  10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
Public Member Functions | Public Attributes | List of all members
lsst.log.log.LogHandler Class Reference
Inheritance diagram for lsst.log.log.LogHandler:

Public Member Functions

def __init__
 
def __del__
 
def close
 
def handle
 
def emit
 
def translateLevel
 

Public Attributes

 context
 

Detailed Description

Definition at line 150 of file log.py.

Constructor & Destructor Documentation

def lsst.log.log.LogHandler.__init__ (   self,
  name = None,
  level = None 
)

Definition at line 151 of file log.py.

152  def __init__(self, name=None, level=None):
153  self.context = LogContext(name=name, level=level)
154  self.context.open()
155  logging.Handler.__init__(self)
def lsst.log.log.LogHandler.__del__ (   self)

Definition at line 156 of file log.py.

157  def __del__(self):
158  self.close()

Member Function Documentation

def lsst.log.log.LogHandler.close (   self)

Definition at line 159 of file log.py.

160  def close(self):
161  if self.context is not None:
162  self.context.close()
163  self.context = None
164  logging.Handler.close(self)
def lsst.log.log.LogHandler.emit (   self,
  record 
)

Definition at line 169 of file log.py.

170  def emit(self, record):
171  forcedLog_iface("", self.translateLevel(record.levelno), record.filename,
172  record.funcName, record.lineno, record.msg % record.args)
void forcedLog_iface(std::string const &loggername, int level, std::string const &filename, std::string const &funcname, int lineno, std::string const &mdg)
Definition: logInterface.cc:87
def lsst.log.log.LogHandler.handle (   self,
  record 
)

Definition at line 165 of file log.py.

166  def handle(self, record):
167  if self.context.isEnabledFor(self.translateLevel(record.levelno)):
168  logging.Handler.handle(self, record)
def lsst.log.log.LogHandler.translateLevel (   self,
  levelno 
)
Translates from standard python logging module levels
to standard log4cxx levels.

Definition at line 173 of file log.py.

174  def translateLevel(self, levelno):
175  """
176  Translates from standard python logging module levels
177  to standard log4cxx levels.
178  """
179  return levelno*1000

Member Data Documentation

lsst.log.log.LogHandler.context

Definition at line 152 of file log.py.


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