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
|
#include <Debug.h>
Public Member Functions | |
Debug (const std::string &name, int verbosity=-1 *Log::INHERIT_THRESHOLD) | |
Debug (const Log &parent, const std::string &name, int verbosity=-1 *Log::INHERIT_THRESHOLD) | |
Debug (const Debug &that) | |
Debug & | operator= (const Debug &that) |
void | debug (int verbosity, const std::string &message) |
void | debug (int verbosity, const boost::format &message) |
void | debug (int verbosity, const char *fmt,...) |
void | debug (int verbosity, const char *fmt, va_list ap) |
template<int VERBOSITY> | |
void | debug (const std::string &message) |
template<int VERBOSITY> | |
void | debug (const char *fmt,...) |
![]() | |
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 () |
Additional Inherited Members | |
![]() | |
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 () |
![]() | |
static const int | DEBUG |
static const int | INFO |
static const int | WARN |
static const int | INHERIT_THRESHOLD |
static const int | FATAL |
![]() | |
void | _send (int threshold, int importance, const char *fmt, va_list ap) |
void | _format (int importance, const char *fmt, va_list ap) |
![]() | |
static void | setDefaultLog (Log *deflog) |
![]() | |
boost::shared_ptr < threshold::Memory > | _thresholds |
std::list< boost::shared_ptr < LogDestination > > | _destinations |
lsst::daf::base::PropertySet::Ptr | _preamble |
![]() | |
static Log * | defaultLog |
static const std::string | _sep |
a special logger used for recording debugging messages.
This class provides some added efficiencies for logging debug messages. In particular, message filtering can be done at compile time, by setting a maximum verboseness level with the LSST_MAX_DEBUG preprocessor define. Note that this define must be set before including Debug.h.
Debug messages are sent through the debug() member functions. Note that verbosity filtering is different than with the Log API. With Log, messages are sent with "importance" levels. However, with the Debug functions, messages are tagged with a "verbosity" level–that is, the higher the verbosity, the less likely the message will be recorded. In fact verbosity is the inverse of–i.e. the negative of–importance. The importance threshold of a Debug Log is -1*LSST_MAX_DEBUG.
|
inline |
|
inline |
|
inline |
|
inline |
print a debug message with a particular verbosity. The decision whether to print this message is done at runtime (just like a normal log message); thus, a message sent to this function that ultimately will not be printed carries more overhead than one sent to debug<n>(). While debug<n>() is thus normally preferred, this function can be useful for temporarily overriding the compile-time verbosity limit.
verbosity | the verbosity level of this message. It will be printed if the value is equal to or lower than the verbosity limit set when the object was constructed. |
message | the message to print. |
Definition at line 104 of file Debug.h.
|
inline |
print a debug message with a particular verbosity. The decision whether to print this message is done at runtime (just like a normal log message); thus, a message sent to this function that ultimately will not be printed carries more overhead than one sent to debug<n>(). Use of this method typically carries the extra overhead of formatting the message. While debug<n>() is thus normally preferred, this function can be useful for temporarily overriding the compile-time verbosity limit.
Definition at line 118 of file Debug.h.
|
inline |
print a formatted message with a particular verbosity.
verbosity | the verboseness to associate with this message |
fmt | a printf-style format string |
... | the inputs to the formatting. |
Definition at line 128 of file Debug.h.
|
inline |
print a formatted message with a particular verbosity. This function is not usually called directly by applications.
verbosity | the verboseness to associate with this message |
fmt | a printf-style format string |
ap | the inputs to the formatting. |
Definition at line 142 of file Debug.h.
|
inline |
conditionally print the given debug message if VERBOSITY is less than or equal to LSST_MAX_DEBUG. This condition is evaluated at compile-time; thus, it is more efficient than the debug() functions.
Definition at line 153 of file Debug.h.
|
inline |
conditionally print a debug message via a format string if VERBOSITY is less than or equal to LSST_MAX_DEBUG. This condition is evaluated at compile-time; thus, it is more efficient than the debug() functions.
fmt | the C-style (as in printf) format string. |
... | the values to plug into the string. Any number may be provided, though they must match the format string. |
Definition at line 168 of file Debug.h.