|
LSSTApplications
8.0.0.0+107,8.0.0.1+13,9.1+18,9.2,master-g084aeec0a4,master-g0aced2eed8+6,master-g15627eb03c,master-g28afc54ef9,master-g3391ba5ea0,master-g3d0fb8ae5f,master-g4432ae2e89+36,master-g5c3c32f3ec+17,master-g60f1e072bb+1,master-g6a3ac32d1b,master-g76a88a4307+1,master-g7bce1f4e06+57,master-g8ff4092549+31,master-g98e65bf68e,master-ga6b77976b1+53,master-gae20e2b580+3,master-gb584cd3397+53,master-gc5448b162b+1,master-gc54cf9771d,master-gc69578ece6+1,master-gcbf758c456+22,master-gcec1da163f+63,master-gcf15f11bcc,master-gd167108223,master-gf44c96c709
LSSTDataManagementBasePackage
|
#include <TracingLog.h>
Public Member Functions | |
| TracingLog (const logging::Log &parent, const std::string &name, int tracelev=TracingLog::TRACE, const std::string &funcName="") | |
| TracingLog (const TracingLog &that) | |
| TracingLog & | operator= (const TracingLog &that) |
| TracingLog * | createForTraceBlock (const std::string &name, int tracelev=logging::Log::INHERIT_THRESHOLD, const std::string &funcName="") |
| TracingLog * | traceBlock (const std::string &name, int tracelev=logging::Log::INHERIT_THRESHOLD, const std::string &funcName="") |
| virtual | ~TracingLog () |
| void | start () |
| void | start (const std::string &funcName) |
| void | done () |
| int | getTraceLevel () const |
| const std::string & | getFunctionName () const |
Public Member Functions inherited from lsst::pex::logging::Log | |
| Log (const int threshold=INFO, const std::string &name="") | |
| Log (const std::list< boost::shared_ptr< LogDestination > > &destinations, const lsst::daf::base::PropertySet &preamble, const std::string &name="", const int threshold=INFO, bool defaultShowAll=false) | |
| Log (const Log &parent, const std::string &childName, int threshold=INHERIT_THRESHOLD) | |
| Log (const Log &that) | |
| virtual | ~Log () |
| Log & | operator= (const Log &that) |
| const std::string & | getName () const |
| int | getThreshold () const |
| void | setThreshold (int threshold) |
| bool | sends (int importance) const |
| void | resetThreshold () |
| void | setThresholdFor (const std::string &name, int threshold) |
| int | getThresholdFor (const std::string &name) const |
| bool | willShowAll () const |
| void | setShowAll (bool yesno) |
| void | resetShowAll () |
| template<class T > | |
| void | addPreambleProperty (const std::string &name, const T &val) |
| template<class T > | |
| void | setPreambleProperty (const std::string &name, const T &val) |
| Log * | createChildLog (const std::string &childName, int threshold=INHERIT_THRESHOLD) const |
| void | log (int importance, const std::string &message, const lsst::daf::base::PropertySet &properties) |
| template<class T > | |
| void | log (int importance, const std::string &message, const std::string &name, const T &val) |
| template<class T > | |
| void | log (int importance, const std::string &message, const RecordProperty< T > &prop) |
| void | log (int importance, const std::string &message) |
| void | log (int importance, const boost::format &message) |
| void | logdebug (const std::string &message, const lsst::daf::base::PropertySet &properties) |
| template<class T > | |
| void | logdebug (const std::string &message, const std::string &name, const T &val) |
| template<class T > | |
| void | logdebug (const std::string &message, const RecordProperty< T > &prop) |
| void | logdebug (const std::string &message) |
| void | logdebug (const boost::format &message) |
| void | info (const std::string &message, const lsst::daf::base::PropertySet &properties) |
| template<class T > | |
| void | info (const std::string &message, const std::string &name, const T &val) |
| template<class T > | |
| void | info (const std::string &message, const RecordProperty< T > &prop) |
| void | info (const std::string &message) |
| void | info (const boost::format &message) |
| void | warn (const std::string &message, const lsst::daf::base::PropertySet &properties) |
| template<class T > | |
| void | warn (const std::string &message, const std::string &name, const T &val) |
| template<class T > | |
| void | warn (const std::string &message, const RecordProperty< T > &prop) |
| void | warn (const std::string &message) |
| void | warn (const boost::format &message) |
| void | fatal (const std::string &message, const lsst::daf::base::PropertySet &properties) |
| template<class T > | |
| void | fatal (const std::string &message, const std::string &name, const T &val) |
| template<class T > | |
| void | fatal (const std::string &message, const RecordProperty< T > &prop) |
| void | fatal (const std::string &message) |
| void | fatal (const boost::format &message) |
| void | format (int importance, const char *fmt,...) |
| void | debugf (const char *fmt,...) |
| void | infof (const char *fmt,...) |
| void | warnf (const char *fmt,...) |
| void | fatalf (const char *fmt,...) |
| void | send (const LogRecord &record) |
| void | addDestination (std::ostream &destination, int threshold) |
| void | addDestination (std::ostream &destination, int threshold, const boost::shared_ptr< LogFormatter > &formatter) |
| void | addDestination (const boost::shared_ptr< LogDestination > &destination) |
| const lsst::daf::base::PropertySet & | getPreamble () |
| void | markPersistent () |
| void | printThresholds (std::ostream &out) |
| void | reset () |
Static Public Attributes | |
| static const int | TRACE = logging::Log::INFO - 1 |
| static const std::string | STATUS |
| static const std::string | START |
| static const std::string | END |
Static Public Attributes inherited from lsst::pex::logging::Log | |
| static const int | DEBUG |
| static const int | INFO |
| static const int | WARN |
| static const int | INHERIT_THRESHOLD |
| static const int | FATAL |
Private Attributes | |
| int | _tracelev |
| std::string | _funcName |
Additional Inherited Members | |
Static Public Member Functions inherited from lsst::pex::logging::Log | |
| static Log & | getDefaultLog () |
| static void | createDefaultLog (const std::list< boost::shared_ptr< LogDestination > > &destinations, const lsst::daf::base::PropertySet &preamble, const std::string &name="", const int threshold=INFO) |
| static void | closeDefaultLog () |
Protected Member Functions inherited from lsst::pex::logging::Log | |
| void | _send (int threshold, int importance, const char *fmt, va_list ap) |
| void | _format (int importance, const char *fmt, va_list ap) |
Static Protected Member Functions inherited from lsst::pex::logging::Log | |
| static void | setDefaultLog (Log *deflog) |
Protected Attributes inherited from lsst::pex::logging::Log | |
| boost::shared_ptr < threshold::Memory > | _thresholds |
| std::list< boost::shared_ptr < LogDestination > > | _destinations |
| lsst::daf::base::PropertySet::Ptr | _preamble |
Static Protected Attributes inherited from lsst::pex::logging::Log | |
| static Log * | defaultLog |
| static const std::string | _sep |
a specialized Log that assists the harness in tracing execution flow.
The motivation for this class is to provide uniformity in the log messages that indicate the start and finish of some section of code. This makes it easier to locate these records after execution and calculate the time spent in the traced code.
Definition at line 50 of file TracingLog.h.
| lsst::pex::harness::TracingLog::TracingLog | ( | const logging::Log & | parent, |
| const std::string & | name, | ||
| int | tracelev = TracingLog::TRACE, |
||
| const std::string & | funcName = "" |
||
| ) |
construct a TracingLog.
| parent | the parent log to inherit attributes from |
| name | the name to give the log relative to its parent |
| tracelev | the default level to use for the tracing messages |
| funcName | the name of the block of code (e.g. function) being traced. If empty, the value given by name will be used instead. This value will be used in the log message only. |
Definition at line 45 of file TracingLog.cc.
|
inline |
create a copy of a TracingLog
Definition at line 92 of file TracingLog.h.
|
virtual |
|
inline |
create and return a new child that should be used while tracing a function. A "start" message will be logged to the new log as part of the call. Like createChildLog(), the caller is responsible for deleting this new instance when finished with it.
| name | the name to give the log relative to its parent |
| tracelev | the default level to use for the tracing messages. If equal to Log::INHERIT_THRESHOLD (default), it will be set to this log's tracing level. |
| funcName | the name of the block of code (e.g. function) being traced. If empty, the value given by name will be used instead. This value will be used in the log message only. |
Definition at line 120 of file TracingLog.h.
|
inline |
Indicate that the section of code being traced (e.g. a function body) is finished.
Definition at line 170 of file TracingLog.h.
|
inline |
return the name of the code block being traced which will appear in the start and end messages.
Definition at line 188 of file TracingLog.h.
|
inline |
return the tracing message level, the importance to be given to the start and end messages.
Definition at line 182 of file TracingLog.h.
|
inline |
reset this instance to another
Definition at line 99 of file TracingLog.h.
|
inline |
Indicate that the section of code being traced (e.g. a function body) is starting.
Definition at line 149 of file TracingLog.h.
|
inline |
Indicate that the section of code being traced (e.g. a function body) is starting.
Definition at line 161 of file TracingLog.h.
|
inline |
a synonym for createForTraceBlock
Definition at line 133 of file TracingLog.h.
|
private |
Definition at line 192 of file TracingLog.h.
|
private |
Definition at line 191 of file TracingLog.h.
|
static |
the property to use to mark the start of a block of code being traced
Definition at line 73 of file TracingLog.h.
|
static |
the property to use to mark the start of a block of code being traced
Definition at line 67 of file TracingLog.h.
|
static |
the property name that will indicate what a trace message is marking
Definition at line 61 of file TracingLog.h.
|
static |
default message level for messages that trace execution flow
Definition at line 56 of file TracingLog.h.
1.8.5