LSST Applications  21.0.0-172-gfb10e10a+18fedfabac,22.0.0+297cba6710,22.0.0+80564b0ff1,22.0.0+8d77f4f51a,22.0.0+a28f4c53b1,22.0.0+dcf3732eb2,22.0.1-1-g7d6de66+2a20fdde0d,22.0.1-1-g8e32f31+297cba6710,22.0.1-1-geca5380+7fa3b7d9b6,22.0.1-12-g44dc1dc+2a20fdde0d,22.0.1-15-g6a90155+515f58c32b,22.0.1-16-g9282f48+790f5f2caa,22.0.1-2-g92698f7+dcf3732eb2,22.0.1-2-ga9b0f51+7fa3b7d9b6,22.0.1-2-gd1925c9+bf4f0e694f,22.0.1-24-g1ad7a390+a9625a72a8,22.0.1-25-g5bf6245+3ad8ecd50b,22.0.1-25-gb120d7b+8b5510f75f,22.0.1-27-g97737f7+2a20fdde0d,22.0.1-32-gf62ce7b1+aa4237961e,22.0.1-4-g0b3f228+2a20fdde0d,22.0.1-4-g243d05b+871c1b8305,22.0.1-4-g3a563be+32dcf1063f,22.0.1-4-g44f2e3d+9e4ab0f4fa,22.0.1-42-gca6935d93+ba5e5ca3eb,22.0.1-5-g15c806e+85460ae5f3,22.0.1-5-g58711c4+611d128589,22.0.1-5-g75bb458+99c117b92f,22.0.1-6-g1c63a23+7fa3b7d9b6,22.0.1-6-g50866e6+84ff5a128b,22.0.1-6-g8d3140d+720564cf76,22.0.1-6-gd805d02+cc5644f571,22.0.1-8-ge5750ce+85460ae5f3,master-g6e05de7fdc+babf819c66,master-g99da0e417a+8d77f4f51a,w.2021.48
LSST Data Management Base Package
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
lsst.log.log.logContinued.Log Class Reference

Public Member Functions

def usePythonLogging (cls)
 
def doNotUsePythonLogging (cls)
 
def name (self)
 
def level (self)
 
def parent (self)
 
def trace (self, fmt, *args)
 
def debug (self, fmt, *args)
 
def info (self, fmt, *args)
 
def warn (self, fmt, *args)
 
def warning (self, fmt, *args)
 
def error (self, fmt, *args)
 
def fatal (self, fmt, *args)
 
def critical (self, fmt, *args)
 
def tracef (self, fmt, *args, **kwargs)
 
def debugf (self, fmt, *args, **kwargs)
 
def infof (self, fmt, *args, **kwargs)
 
def warnf (self, fmt, *args, **kwargs)
 
def errorf (self, fmt, *args, **kwargs)
 
def fatalf (self, fmt, *args, **kwargs)
 
def __reduce__ (self)
 
def __repr__ (self)
 

Public Attributes

 UsePythonLogging
 

Static Public Attributes

bool UsePythonLogging = False
 
 CRITICAL = CRITICAL
 
 WARNING = WARNING
 

Detailed Description

Definition at line 57 of file logContinued.py.

Member Function Documentation

◆ __reduce__()

def lsst.log.log.logContinued.Log.__reduce__ (   self)
Implement pickle support.

Definition at line 186 of file logContinued.py.

186  record = logging.makeLogRecord(dict(name=self.getName(),
187  levelno=levelno,
188  levelname=levelName,
189  msg=msg,
190  funcName=funcname,
191  filename=filename,
192  pathname=frame.f_code.co_filename,

◆ __repr__()

def lsst.log.log.logContinued.Log.__repr__ (   self)

Definition at line 193 of file logContinued.py.

193  lineno=frame.f_lineno))
194  pylog.handle(record)
195  else:
196  self.logMsg(level, filename, funcname, frame.f_lineno, msg)
197 
198  def __reduce__(self):
199  """Implement pickle support.
200  """
201  args = (self.getName(), )
202  # method has to be module-level, not class method

◆ critical()

def lsst.log.log.logContinued.Log.critical (   self,
  fmt,
args 
)

Definition at line 130 of file logContinued.py.

130  def critical(self, fmt, *args):
131  # Do not call fatal() because that will result in an incorrect
132  # line number in the log.
133  self._log(Log.FATAL, False, fmt, *args)
134 
def critical(fmt, *args)

◆ debug()

def lsst.log.log.logContinued.Log.debug (   self,
  fmt,
args 
)

Definition at line 110 of file logContinued.py.

110  def debug(self, fmt, *args):
111  self._log(Log.DEBUG, False, fmt, *args)
112 

◆ debugf()

def lsst.log.log.logContinued.Log.debugf (   self,
  fmt,
args,
**  kwargs 
)

Definition at line 140 of file logContinued.py.

140 
141  @deprecated(reason="f-string log messages are now deprecated to match python logging convention."
142  " Will be removed after v25",

◆ doNotUsePythonLogging()

def lsst.log.log.logContinued.Log.doNotUsePythonLogging (   cls)
Forward log messages to LSST logging system.

Notes
-----
This is the default state.

Definition at line 80 of file logContinued.py.

80  def doNotUsePythonLogging(cls):
81  """Forward log messages to LSST logging system.
82 
83  Notes
84  -----
85  This is the default state.
86  """
87  cls.UsePythonLogging = False
88 

◆ error()

def lsst.log.log.logContinued.Log.error (   self,
  fmt,
args 
)

Definition at line 124 of file logContinued.py.

124  def error(self, fmt, *args):
125  self._log(Log.ERROR, False, fmt, *args)
126 

◆ errorf()

def lsst.log.log.logContinued.Log.errorf (   self,
  fmt,
args,
**  kwargs 
)

Definition at line 152 of file logContinued.py.

152 
153  @deprecated(reason="f-string log messages are now deprecated to match python logging convention."
154  " Will be removed after v25",

◆ fatal()

def lsst.log.log.logContinued.Log.fatal (   self,
  fmt,
args 
)

Definition at line 127 of file logContinued.py.

127  def fatal(self, fmt, *args):
128  self._log(Log.FATAL, False, fmt, *args)
129 

◆ fatalf()

def lsst.log.log.logContinued.Log.fatalf (   self,
  fmt,
args,
**  kwargs 
)

Definition at line 156 of file logContinued.py.

156  def warnf(self, fmt, *args, **kwargs):
157  self._log(Log.WARN, True, fmt, *args, **kwargs)
158 
def warnf(fmt, *args, **kwargs)

◆ info()

def lsst.log.log.logContinued.Log.info (   self,
  fmt,
args 
)

Definition at line 113 of file logContinued.py.

113  def info(self, fmt, *args):
114  self._log(Log.INFO, False, fmt, *args)
115 

◆ infof()

def lsst.log.log.logContinued.Log.infof (   self,
  fmt,
args,
**  kwargs 
)

Definition at line 144 of file logContinued.py.

144  def debugf(self, fmt, *args, **kwargs):
145  self._log(Log.DEBUG, True, fmt, *args, **kwargs)
146 
def debugf(fmt, *args, **kwargs)

◆ level()

def lsst.log.log.logContinued.Log.level (   self)

Definition at line 94 of file logContinued.py.

94  def level(self):
95  return self.getLevel()
96 

◆ name()

def lsst.log.log.logContinued.Log.name (   self)

Definition at line 90 of file logContinued.py.

90  def name(self):
91  return self.getName()
92 
table::Key< std::string > name
Definition: Amplifier.cc:116

◆ parent()

def lsst.log.log.logContinued.Log.parent (   self)
Returns the parent logger, or None if this is the root logger.

Definition at line 98 of file logContinued.py.

98  def parent(self):
99  """Returns the parent logger, or None if this is the root logger."""
100  if not self.name:
101  return None
102  parent_name = self.name.rpartition(".")[0]
103  if not parent_name:
104  return self.getDefaultLogger()
105  return self.getLogger(parent_name)
106 

◆ trace()

def lsst.log.log.logContinued.Log.trace (   self,
  fmt,
args 
)

Definition at line 107 of file logContinued.py.

107  def trace(self, fmt, *args):
108  self._log(Log.TRACE, False, fmt, *args)
109 

◆ tracef()

def lsst.log.log.logContinued.Log.tracef (   self,
  fmt,
args,
**  kwargs 
)

Definition at line 136 of file logContinued.py.

136  " Will be removed after v25",
137  version="v23.0", category=FutureWarning)
138  def tracef(self, fmt, *args, **kwargs):
def tracef(fmt, *args, **kwargs)

◆ usePythonLogging()

def lsst.log.log.logContinued.Log.usePythonLogging (   cls)
Forward log messages to Python `logging`

Notes
-----
This is useful for unit testing when you want to ensure
that log messages are captured by the testing environment
as distinct from standard output.

This state only affects messages sent to the `lsst.log`
package from Python.

Definition at line 65 of file logContinued.py.

65  def usePythonLogging(cls):
66  """Forward log messages to Python `logging`
67 
68  Notes
69  -----
70  This is useful for unit testing when you want to ensure
71  that log messages are captured by the testing environment
72  as distinct from standard output.
73 
74  This state only affects messages sent to the `lsst.log`
75  package from Python.
76  """
77  cls.UsePythonLogging = True
78 

◆ warn()

def lsst.log.log.logContinued.Log.warn (   self,
  fmt,
args 
)

Definition at line 116 of file logContinued.py.

116  def warn(self, fmt, *args):
117  self._log(Log.WARN, False, fmt, *args)
118 

◆ warnf()

def lsst.log.log.logContinued.Log.warnf (   self,
  fmt,
args,
**  kwargs 
)

Definition at line 148 of file logContinued.py.

148  " Will be removed after v25",
149  version="v23.0", category=FutureWarning)
150  def infof(self, fmt, *args, **kwargs):
def infof(fmt, *args, **kwargs)

◆ warning()

def lsst.log.log.logContinued.Log.warning (   self,
  fmt,
args 
)

Definition at line 119 of file logContinued.py.

119  def warning(self, fmt, *args):
120  # Do not call warn() because that will result in an incorrect
121  # line number in the log.
122  self._log(Log.WARN, False, fmt, *args)
123 

Member Data Documentation

◆ CRITICAL

lsst.log.log.logContinued.Log.CRITICAL = CRITICAL
static

Definition at line 61 of file logContinued.py.

◆ UsePythonLogging [1/2]

bool lsst.log.log.logContinued.Log.UsePythonLogging = False
static

Definition at line 58 of file logContinued.py.

◆ UsePythonLogging [2/2]

lsst.log.log.logContinued.Log.UsePythonLogging

Definition at line 77 of file logContinued.py.

◆ WARNING

lsst.log.log.logContinued.Log.WARNING = WARNING
static

Definition at line 62 of file logContinued.py.


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