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
Classes | Functions | Variables
lsst.log.log Namespace Reference

Classes

class  LogContext
 
class  LogHandler
 

Functions

def configure
 
def configure_prop
 
def getDefaultLoggerName
 
def pushContext
 
def popContext
 
def MDC
 
def MDCRemove
 
def setLevel
 
def getLevel
 
def isEnabledFor
 
def _getFrame
 
def _getFuncName
 
def log
 
def trace
 
def debug
 
def info
 
def warn
 
def error
 
def fatal
 

Variables

int TRACE = 5000
 
int DEBUG = 10000
 
int INFO = 20000
 
int WARN = 30000
 
int ERROR = 40000
 
int FATAL = 50000
 

Function Documentation

def lsst.log.log._getFrame (   depth)
private

Definition at line 76 of file log.py.

76 
77 def _getFrame(depth):
78  frame = inspect.currentframe().f_back
79  for i in range(depth):
80  frame = frame.f_back
81  return frame
def _getFrame
Definition: log.py:76
def lsst.log.log._getFuncName (   depth)
private

Definition at line 82 of file log.py.

82 
83 def _getFuncName(depth):
84  return inspect.stack()[depth+1][3]
def _getFuncName
Definition: log.py:82
def lsst.log.log.configure (   args)

Definition at line 42 of file log.py.

42 
43 def configure(*args):
44  if len(args) > 0:
45  configure_iface(args[0])
46  else:
def configure
Definition: log.py:42
void configure_iface(void)
Definition: logInterface.cc:43
def lsst.log.log.configure_prop (   properties)

Definition at line 48 of file log.py.

48 
49 def configure_prop(properties):
50  configure_prop_iface(properties)
void configure_prop_iface(std::string const &properties)
Definition: logInterface.cc:51
def configure_prop
Definition: log.py:48
def lsst.log.log.debug (   fmt,
  args 
)

Definition at line 99 of file log.py.

99 
100 def debug(fmt, *args):
101  log("", DEBUG, fmt, *args, depth=2)
def log
Definition: log.py:85
def debug
Definition: log.py:99
def lsst.log.log.error (   fmt,
  args 
)

Definition at line 108 of file log.py.

109 def error(fmt, *args):
110  log("", ERROR, fmt, *args, depth=2)
def error
Definition: log.py:108
def log
Definition: log.py:85
def lsst.log.log.fatal (   fmt,
  args 
)

Definition at line 111 of file log.py.

112 def fatal(fmt, *args):
113  log("", FATAL, fmt, *args, depth=2)
def fatal
Definition: log.py:111
def log
Definition: log.py:85
def lsst.log.log.getDefaultLoggerName ( )

Definition at line 51 of file log.py.

51 
54  return name
std::string getDefaultLoggerName_iface(void)
Definition: logInterface.cc:55
def getDefaultLoggerName
Definition: log.py:51
def lsst.log.log.getLevel (   loggername)

Definition at line 70 of file log.py.

70 
71 def getLevel(loggername):
72  return getLevel_iface(loggername)
def getLevel
Definition: log.py:70
int getLevel_iface(std::string const &loggername)
Definition: logInterface.cc:79
def lsst.log.log.info (   fmt,
  args 
)

Definition at line 102 of file log.py.

103 def info(fmt, *args):
104  log("", INFO, fmt, *args, depth=2)
def info
Definition: log.py:102
def log
Definition: log.py:85
def lsst.log.log.isEnabledFor (   loggername,
  level 
)

Definition at line 73 of file log.py.

73 
74 def isEnabledFor(loggername, level):
75  return isEnabledFor_iface(loggername, level)
def isEnabledFor
Definition: log.py:73
bool isEnabledFor_iface(std::string const &loggername, int level)
Definition: logInterface.cc:83
def lsst.log.log.log (   loggername,
  level,
  fmt,
  args,
  kwargs 
)

Definition at line 85 of file log.py.

85 
86 def log(loggername, level, fmt, *args, **kwargs):
87  if 'depth' in kwargs:
88  depth = kwargs['depth']
89  else:
90  depth = 1
91  if isEnabledFor(loggername, level):
92  frame = _getFrame(depth)
93  forcedLog_iface(loggername, level,
94  path.split(frame.f_code.co_filename)[1],
95  _getFuncName(depth), frame.f_lineno, fmt % args)
def isEnabledFor
Definition: log.py:73
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 _getFrame
Definition: log.py:76
def log
Definition: log.py:85
def _getFuncName
Definition: log.py:82
def lsst.log.log.MDC (   key,
  value 
)

Definition at line 61 of file log.py.

61 
62 def MDC(key, value):
63  MDC_iface(str(key), str(value))
def MDC
Definition: log.py:61
void MDC_iface(std::string const &key, std::string const &value)
Definition: logInterface.cc:67
def lsst.log.log.MDCRemove (   key)

Definition at line 64 of file log.py.

64 
65 def MDCRemove(key):
66  MDCRemove_iface(str(key))
void MDCRemove_iface(std::string const &key)
Definition: logInterface.cc:71
def MDCRemove
Definition: log.py:64
def lsst.log.log.popContext ( )

Definition at line 58 of file log.py.

58 
59 def popContext():
def popContext
Definition: log.py:58
void popContext_iface()
Definition: logInterface.cc:63
def lsst.log.log.pushContext (   name)

Definition at line 55 of file log.py.

55 
56 def pushContext(name):
57  pushContext_iface(name)
void pushContext_iface(std::string const &name)
Definition: logInterface.cc:59
def pushContext
Definition: log.py:55
def lsst.log.log.setLevel (   loggername,
  level 
)

Definition at line 67 of file log.py.

67 
68 def setLevel(loggername, level):
69  setLevel_iface(loggername, level)
void setLevel_iface(std::string const &loggername, int level)
Definition: logInterface.cc:75
def setLevel
Definition: log.py:67
def lsst.log.log.trace (   fmt,
  args 
)

Definition at line 96 of file log.py.

96 
97 def trace(fmt, *args):
98  log("", TRACE, fmt, *args, depth=2)
def trace
Definition: log.py:96
def log
Definition: log.py:85
def lsst.log.log.warn (   fmt,
  args 
)

Definition at line 105 of file log.py.

106 def warn(fmt, *args):
107  log("", WARN, fmt, *args, depth=2)
def log
Definition: log.py:85
def warn
Definition: log.py:105

Variable Documentation

int lsst.log.log.DEBUG = 10000

Definition at line 36 of file log.py.

int lsst.log.log.ERROR = 40000

Definition at line 39 of file log.py.

int lsst.log.log.FATAL = 50000

Definition at line 40 of file log.py.

int lsst.log.log.INFO = 20000

Definition at line 37 of file log.py.

int lsst.log.log.TRACE = 5000

Definition at line 35 of file log.py.

int lsst.log.log.WARN = 30000

Definition at line 38 of file log.py.