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
|
a Log configured to send messages to the screen. The BriefFormatter is used to format the messages. More...
#include <ScreenLog.h>
Public Member Functions | |
ScreenLog (bool verbose=false, int threshold=Log::INFO) | |
ScreenLog (const lsst::daf::base::PropertySet &preamble, bool verbose=false, int threshold=Log::INFO) | |
ScreenLog (const ScreenLog &that) | |
virtual | ~ScreenLog () |
ScreenLog & | operator= (const ScreenLog &that) |
int | getScreenThreshold () |
void | setScreenThreshold (int thresh) |
void | setScreenVerbose (bool printAll) |
bool | isScreenVerbose () |
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 Member Functions | |
static void | createDefaultLog (bool verbose=false, int threshold=Log::INFO) |
static void | createDefaultLog (const lsst::daf::base::PropertySet &preamble, bool verbose=false, int threshold=Log::INFO) |
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 () |
Private Member Functions | |
void | configure (bool verbose) |
Private Attributes | |
LogDestination * | _screen |
BriefFormatter * | _screenFrmtr |
Additional Inherited Members | |
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 |
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 Log configured to send messages to the screen. The BriefFormatter is used to format the messages.
Definition at line 43 of file ScreenLog.h.
lsst::pex::logging::ScreenLog::ScreenLog | ( | bool | verbose = false , |
int | threshold = Log::INFO |
||
) |
create a Log that will write messages to a given file
threshold | the importance threshold to set for messages going to the screen. |
verbose | if true, all message data properties will be printed to the screen. If false, only the Log name ("LOG") and the text comment ("COMMENT") will be printed. |
lsst::pex::logging::ScreenLog::ScreenLog | ( | const lsst::daf::base::PropertySet & | preamble, |
bool | verbose = false , |
||
int | threshold = Log::INFO |
||
) |
create a Log that will write messages to a given file
preamble | a list of data properties that should be included with every recorded message to the Log. This constructor will automatically add a property ("LOG") giving the Log name. |
threshold | the importance threshold to set for messages going to the screen. |
verbose | if true, all message data properties will be printed to the screen. If false, only the Log name ("LOG") and the text comment ("COMMENT") will be printed. |
|
inline |
create a copy
Definition at line 76 of file ScreenLog.h.
|
virtual |
delete this log
|
private |
|
static |
create a new log and set it as the default Log
threshold | the importance threshold to set for messages going to the screen. |
verbose | if true, all message data properties will be printed to the screen. If false, only the Log name ("LOG") and the text comment ("COMMENT") will be printed. |
|
static |
create a new log and set it as the default Log
preamble | a list of data properties that should be included with every recorded message to the Log. This constructor will automatically add a property ("LOG") giving the Log name. |
threshold | the importance threshold to set for messages going to the screen. |
verbose | if true, all message data properties will be printed to the screen. If false, only the Log name ("LOG") and the text comment ("COMMENT") will be printed. |
|
inline |
return the importance threshold current set for the screen
Definition at line 93 of file ScreenLog.h.
|
inline |
return true if all data properties will be printed to the screen or false if just the Log name ("LOG") and the text comment ("COMMENT") will be printed.
Definition at line 112 of file ScreenLog.h.
copy another ScreenLog into this one
|
inline |
set the importance threshold current set for the screen
Definition at line 98 of file ScreenLog.h.
|
inline |
set whether all data properties will be printed to the screen or just the Log name ("LOG") and the text comment ("COMMENT").
printAll | true if all properties should be printed. |
Definition at line 105 of file ScreenLog.h.
|
private |
Definition at line 144 of file ScreenLog.h.
|
private |
Definition at line 145 of file ScreenLog.h.