LSSTApplications  16.0-10-g0ee56ad+4,16.0-11-ga33d1f2+4,16.0-12-g3ef5c14+2,16.0-12-g71e5ef5+17,16.0-12-gbdf3636+2,16.0-13-g118c103+2,16.0-13-g8f68b0a+2,16.0-15-gbf5c1cb+3,16.0-16-gfd17674+2,16.0-17-g7c01f5c+2,16.0-18-g0a50484,16.0-20-ga20f992+7,16.0-21-g0e05fd4+5,16.0-21-g15e2d33+3,16.0-22-g62d8060+3,16.0-22-g847a80f+3,16.0-25-gf00d9b8,16.0-28-g3990c221+3,16.0-3-gf928089+2,16.0-32-g88a4f23+4,16.0-34-gd7987ad+2,16.0-37-gc7333cb+1,16.0-4-g10fc685+1,16.0-4-g18f3627+25,16.0-4-g5f3a788+25,16.0-5-gaf5c3d7+3,16.0-5-gcc1f4bb,16.0-6-g3b92700+3,16.0-6-g4412fcd+2,16.0-6-g7235603+3,16.0-69-g2562ce1b+1,16.0-7-g0913a87,16.0-8-g14ebd58+3,16.0-8-g2df868b,16.0-8-g4cec79c+5,16.0-8-gadf6c7a,16.0-82-g59ec2a54a,16.0-9-g5400cdc+1,16.0-9-ge6233d7+4,master-g2880f2d8cf+2,v17.0.rc1
LSSTDataManagementBasePackage
Public Member Functions | Public Attributes | List of all members
lsst.sconsUtils.utils.Log Class Reference

A dead-simple logger for all messages. More...

Public Member Functions

def __init__ (self)
 
def info (self, message)
 
def warn (self, message)
 
def fail (self, message)
 
def flush (self)
 

Public Attributes

 traceback
 
 verbose
 

Detailed Description

A dead-simple logger for all messages.

This simply centralizes decisions about whether to throw exceptions or print user-friendly messages (the traceback variable) and whether to print extra debug info (the verbose variable). These are set from command-line options in state.py.

Definition at line 22 of file utils.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.sconsUtils.utils.Log.__init__ (   self)

Definition at line 24 of file utils.py.

24  def __init__(self):
25  self.traceback = False
26  self.verbose = True
27 
def __init__(self, minimum, dataRange, Q)

Member Function Documentation

◆ fail()

def lsst.sconsUtils.utils.Log.fail (   self,
  message 
)

Definition at line 38 of file utils.py.

38  def fail(self, message):
39  if self.traceback:
40  raise RuntimeError(message)
41  else:
42  if message:
43  print(message, file=sys.stderr)
44  SCons.Script.Exit(1)
45 

◆ flush()

def lsst.sconsUtils.utils.Log.flush (   self)

Definition at line 46 of file utils.py.

46  def flush(self):
47  sys.stderr.flush()
48 
49 

◆ info()

def lsst.sconsUtils.utils.Log.info (   self,
  message 
)

Definition at line 28 of file utils.py.

28  def info(self, message):
29  if self.verbose:
30  print(message)
31 

◆ warn()

def lsst.sconsUtils.utils.Log.warn (   self,
  message 
)

Definition at line 32 of file utils.py.

32  def warn(self, message):
33  if self.traceback:
34  warnings.warn(message, stacklevel=2)
35  else:
36  print(message, file=sys.stderr)
37 

Member Data Documentation

◆ traceback

lsst.sconsUtils.utils.Log.traceback

Definition at line 25 of file utils.py.

◆ verbose

lsst.sconsUtils.utils.Log.verbose

Definition at line 26 of file utils.py.


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