LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Public Member Functions | Private Attributes | List of all members
lsst::pex::logging::BriefFormatter Class Reference

a formatter that renders records in a brief format for screen display. More...

#include <LogFormatter.h>

Inheritance diagram for lsst::pex::logging::BriefFormatter:
lsst::pex::logging::LogFormatter lsst::pex::logging::IndentedFormatter

Public Member Functions

 BriefFormatter (bool verbose=false)
 
 BriefFormatter (const BriefFormatter &that)
 
virtual ~BriefFormatter ()
 
BriefFormatteroperator= (const BriefFormatter &that)
 
bool isVerbose ()
 
void setVerbose (bool printAll)
 
virtual void write (std::ostream *strm, const LogRecord &rec)
 
- Public Member Functions inherited from lsst::pex::logging::LogFormatter
 LogFormatter ()
 
 LogFormatter (const LogFormatter &that)
 
virtual ~LogFormatter ()
 
LogFormatteroperator= (const LogFormatter &that)
 

Private Attributes

bool _doAll
 

Detailed Description

a formatter that renders records in a brief format for screen display.

This formatter has a normal mode and a verbose mode. In normal mode, only the log name (LOG) and text messages (COMMENT) are printed. In verbose mode, all other properties are printed as well.

Definition at line 114 of file LogFormatter.h.

Constructor & Destructor Documentation

lsst::pex::logging::BriefFormatter::BriefFormatter ( bool  verbose = false)
inlineexplicit

create the formatter.

Parameters
verboseall data property values will be printed.

Definition at line 121 of file LogFormatter.h.

lsst::pex::logging::BriefFormatter::BriefFormatter ( const BriefFormatter that)
inline

create a copy of a LogFormatter

Definition at line 128 of file LogFormatter.h.

virtual lsst::pex::logging::BriefFormatter::~BriefFormatter ( )
virtual

delete the formatter

Member Function Documentation

bool lsst::pex::logging::BriefFormatter::isVerbose ( )
inline

return true if all data properties will be printed or false if just the Log name ("LOG") and the text comment ("COMMENT") will be printed by default. All properties will always be printed when the LogRecord's willShowAll() returns true.

Definition at line 154 of file LogFormatter.h.

BriefFormatter& lsst::pex::logging::BriefFormatter::operator= ( const BriefFormatter that)
inline

copy another formatter into this one

Definition at line 140 of file LogFormatter.h.

140  {
141  if (this == &that) return *this;
142 
143  dynamic_cast<LogFormatter*>(this)->operator=(that);
144  _doAll = that._doAll;
145  return *this;
146  }
void lsst::pex::logging::BriefFormatter::setVerbose ( bool  printAll)
inline

set whether all data properties will be printed by default or just the Log name ("LOG") and the text comment ("COMMENT"). This will be over-ridden for any LogRecord whose willShowAll() returns true.

Parameters
printAlltrue if all properties should be printed.

Definition at line 163 of file LogFormatter.h.

163 { _doAll = printAll; }
virtual void lsst::pex::logging::BriefFormatter::write ( std::ostream *  strm,
const LogRecord rec 
)
virtual

write out a log record to a stream

Parameters
strmthe output stream to write the record to
recthe record to write

Implements lsst::pex::logging::LogFormatter.

Reimplemented in lsst::pex::logging::IndentedFormatter.

Member Data Documentation

bool lsst::pex::logging::BriefFormatter::_doAll
private

Definition at line 174 of file LogFormatter.h.


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