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
Namespaces | Classes | Typedefs | Functions
lsst::pex::logging Namespace Reference

Namespaces

 threshold
 
 version
 

Classes

class  BlockTimingLog
 
class  Component
 Create a component in the verbosity tree (deprecated). More...
 
class  Debug
 
class  DualLog
 a Log that sends message to both the screen and a file. More...
 
class  FileDestination
 a LogDestination represented by a file. More...
 
class  Log
 a place to record messages and descriptions of the state of processing. More...
 
class  LogRec
 A LogRecord attached to a particular Log that suppports stream stream semantics. More...
 
class  LogClient
 an abstract interface identifying a class that writes messages to a Log. Other classes inherit from this interface to add standard methods for setting and retrieving the log that the classs will send its log messages to. More...
 
class  LogClientHelper
 
class  LogDestination
 an encapsulation of a logging stream that will filter messages based on their volume (importance) level. More...
 
class  LogFormatter
 an abstract class for formatting log records into a text stream. More...
 
class  BriefFormatter
 a formatter that renders records in a brief format for screen display. More...
 
class  IndentedFormatter
 
class  NetLoggerFormatter
 a formatter that renders records in a netlogger-like format. More...
 
class  RecordProperty
 a container for a named data property for a LogRecord More...
 
class  Prop
 
class  LogRecord
 a container for constructing a single Log record More...
 
class  PrinterIter
 an abstract iterator class used to print out property values More...
 
class  BaseTmplPrinterIter
 
class  TmplPrinterIter
 
class  WrappedPrinterIter
 a wrapper PrinterIter class that hides the polymorphic (and possibly templatized) nature of an underlying PrinterIter subclass. More...
 
class  PrinterList
 an abstract class that encapsulates a list of property values to be printed out. More...
 
class  BaseTmplPrinterList
 
class  TmplPrinterList
 
class  DateTimePrinterIter
 
class  DateTimePrinterList
 
class  BoolPrinterIter
 
class  BoolPrinterList
 
class  PrinterFactory
 a factory used to create PrinterList instances to be used by a PropertyPrinter instance. More...
 
class  PropertyPrinter
 an class for printing the values associated with a name in a PropertySet. More...
 
class  ScreenLog
 a Log configured to send messages to the screen. The BriefFormatter is used to format the messages. More...
 
class  Trace
 limited backward compatibility to the DC2 run-time trace facilities More...
 

Typedefs

typedef LogRec Rec
 

Functions

template<int VERBOSITY>
void debug (const std::string &name, const std::string &message)
 
template<int VERBOSITY>
void debug (const std::string &name, const char *fmt,...)
 
template<class T >
PrinterListmakePrinter (const lsst::daf::base::PropertySet &prop, const std::string &name)
 the template factory function for supporting printing of printable types More...
 
PrinterListmakeDateTimePrinter (const lsst::daf::base::PropertySet &prop, const std::string &name)
 
PrinterListmakeBoolPrinter (const lsst::daf::base::PropertySet &prop, const std::string &name)
 
template<int VERBOSITY>
void TTrace (const char *name, const char *fmt,...)
 
template<int VERBOSITY>
void TTrace (const std::string name, const std::string fmt,...)
 

Typedef Documentation

a shorthand version of the LogRec class

Definition at line 838 of file Log.h.

Function Documentation

template<int VERBOSITY>
void lsst::pex::logging::debug ( const std::string &  name,
const std::string &  message 
)

send a debug message to a named log. This message will not be printed if VERBOSITY > LSST_MAX_DEBUG. This method saves creating a log if the VERBOSITY level is too high to be printed, at the expense of re-creating everytime VERBOSITY is low.

Definition at line 186 of file Debug.h.

186  {
187  if (LSST_MAX_DEBUG <= 0 || VERBOSITY <= LSST_MAX_DEBUG) {
188  Debug(name).debug<VERBOSITY>(message);
189  }
190 }
table::Key< std::string > name
Definition: ApCorrMap.cc:71
#define LSST_MAX_DEBUG
Definition: Debug.h:56
template<int VERBOSITY>
void lsst::pex::logging::debug ( const std::string &  name,
const char *  fmt,
  ... 
)

send a formatted debug message to a named log. This message will not be printed if VERBOSITY > LSST_MAX_DEBUG. This method saves creating a log if the VERBOSITY level is too high to be printed, at the expense of re-creating everytime VERBOSITY is low.

Definition at line 199 of file Debug.h.

199  {
200  if (LSST_MAX_DEBUG <= 0 || VERBOSITY <= LSST_MAX_DEBUG) {
201  va_list ap;
202  va_start(ap, fmt);
203  Debug(name).debug(VERBOSITY, fmt, ap);
204  va_end(ap);
205  }
206 }
table::Key< std::string > name
Definition: ApCorrMap.cc:71
#define LSST_MAX_DEBUG
Definition: Debug.h:56
PrinterList* lsst::pex::logging::makeBoolPrinter ( const lsst::daf::base::PropertySet prop,
const std::string &  name 
)
PrinterList* lsst::pex::logging::makeDateTimePrinter ( const lsst::daf::base::PropertySet prop,
const std::string &  name 
)
template<class T >
PrinterList* lsst::pex::logging::makePrinter ( const lsst::daf::base::PropertySet prop,
const std::string &  name 
)

the template factory function for supporting printing of printable types

By instantiating this template, one automatically generates not only this function by also the PrinterList and PrinterIter classes it creates. This will work for types that can be printed to a stream via the output (<<) operator.

Definition at line 306 of file PropertyPrinter.h.

307  {
308  return new TmplPrinterList<T>(prop, name);
309 }
table::Key< std::string > name
Definition: ApCorrMap.cc:71
template<int VERBOSITY>
void lsst::pex::logging::TTrace ( const char *  name,
const char *  fmt,
  ... 
)
Parameters
nameName of component
fmtMessage to write as a printf format

Definition at line 193 of file Trace.h.

196  {
197  if (LSST_MAX_TRACE < 0 || VERBOSITY <= LSST_MAX_TRACE) {
198  va_list ap;
199 
200  // first determine the length of the message
201  va_start(ap, fmt);
202  const int len = vsnprintf(NULL, 0, fmt, ap) + 1; // "+ 1" for the '\0'
203  va_end(ap);
204 
205  char msg[len];
206  va_start(ap, fmt);
207  (void)vsnprintf(msg, len, fmt, ap);
208  va_end(ap);
209 
210  Trace(name, VERBOSITY, msg);
211  }
212 }
table::Key< std::string > name
Definition: ApCorrMap.cc:71
#define LSST_MAX_TRACE
Maximum level to trace (only works for TTrace)
Definition: Trace.h:58
template<int VERBOSITY>
void lsst::pex::logging::TTrace ( const std::string  name,
const std::string  fmt,
  ... 
)
Parameters
nameName of component
fmtMessage to write as a printf form at

Definition at line 215 of file Trace.h.

218  {
219  if (LSST_MAX_TRACE < 0 || VERBOSITY <= LSST_MAX_TRACE) {
220  va_list ap;
221  va_start(ap, fmt);
222  Trace(name, VERBOSITY, fmt, ap);
223  va_end(ap);
224  }
225 }
table::Key< std::string > name
Definition: ApCorrMap.cc:71
#define LSST_MAX_TRACE
Maximum level to trace (only works for TTrace)
Definition: Trace.h:58