QwAnalysis
|
A logfile class. More...
#include <QwLog.h>
Inherits std::ostream.
Public Types | |
enum | QwLogLevel { kAlways = -1, kError = 0, kWarning = 1, kMessage = 2, kVerbose = 3, kDebug = 4 } |
Loglevels. More... | |
Public Member Functions | |
void | ProcessOptions (QwOptions *options) |
Process class options for QwOptions. More... | |
QwLog () | |
The constructor. More... | |
virtual | ~QwLog () |
The destructor. More... | |
bool | IsDebugFunction (const string func_name) |
Determine whether the function name matches a specified list of regular expressions. More... | |
void | InitLogFile (const std::string name, const std::ios_base::openmode mode=kAppend) |
Initialize the log file with name 'name'. More... | |
void | SetScreenColor (bool flag) |
Set the screen color mode. More... | |
void | SetScreenThreshold (int thr) |
Set the screen log level. More... | |
void | SetFileThreshold (int thr) |
Set the file log level. More... | |
QwLog & | operator() (const QwLogLevel level, const std::string func_sig="<unknown>") |
Set the stream log level. More... | |
template<class T > | |
QwLog & | operator<< (const T &t) |
Stream an object to the output stream. More... | |
QwLog & | operator<< (std::ostream &(*manip)(std::ostream &)) |
Pass the ios_base manipulators. More... | |
Static Public Member Functions | |
static void | DefineOptions (QwOptions *options) |
Define available class options for QwOptions. More... | |
static std::ostream & | endl (std::ostream &) |
End of the line. More... | |
static std::ostream & | flush (std::ostream &) |
Flush the streams. More... | |
Static Public Attributes | |
static const std::ios_base::openmode | kTruncate = std::ios::trunc |
Log file open modes. More... | |
static const std::ios_base::openmode | kAppend = std::ios::app |
Private Member Functions | |
const char * | GetTime () |
Get the local time. More... | |
Private Attributes | |
char | fTimeString [128] |
QwLogLevel | fScreenThreshold |
Screen thresholds and stream. More... | |
std::ostream * | fScreen |
QwLogLevel | fFileThreshold |
File thresholds and stream. More... | |
std::ostream * | fFile |
QwLogLevel | fLogLevel |
Log level of this stream. More... | |
bool | fPrintFunctionSignature |
Flag to print function signature on warning or error. More... | |
std::map< std::string, bool > | fIsDebugFunction |
List of regular expressions for functions that will have increased log level. More... | |
std::vector< std::string > | fDebugFunctionRegexString |
bool | fUseColor |
Flag to disable color. More... | |
Static Private Attributes | |
static bool | fFileAtNewLine = true |
Flags only relevant for current line, but static for use in static function. More... | |
static bool | fScreenInColor = false |
static bool | fScreenAtNewLine = true |
A logfile class.
This class should not be used directly. Instead one can write text to the screen or a log file via the predefined log drains QwError, QwWarning, QwMessage, QwVerbose and QwDebug. A special log drain QwOut will always be printed and is reserved for output explicitly requested by the user.
An example could be:
QwMessage << "Hello World !!!" << QwLog::endl;
enum QwLog::QwLogLevel |
Loglevels.
enum of possible log levels
Enumerator | |
---|---|
kAlways |
Explicit output |
kError |
Error loglevel |
kWarning |
Warning loglevel |
kMessage |
Message loglevel |
kVerbose |
Verbose loglevel |
kDebug |
Debug loglevel |
Definition at line 93 of file QwLog.h.
QwLog::QwLog | ( | ) |
The constructor.
The constructor initializes the screen stream and resets the file stream
Definition at line 35 of file QwLog.cc.
References fFile, fFileThreshold, fLogLevel, fPrintFunctionSignature, fScreen, fScreenThreshold, fUseColor, and kMessage.
|
virtual |
|
static |
Define available class options for QwOptions.
Defines configuration options for logging class using QwOptions functionality.
Note: this uses a pointer as opposed to a reference, because as indicated above the QwLog class cannot depend on the QwOptions class. When using a pointer we only need a forward declaration and we do not need to include the header file QwOptions.h.
options | Options object |
Definition at line 73 of file QwLog.cc.
References QwOptions::AddOptions(), default_bool_value, and kMessage.
Referenced by QwOptions::DefineOptions().
|
static |
End of the line.
End of the line
Definition at line 299 of file QwLog.cc.
References fFile, fFileAtNewLine, fFileThreshold, fLogLevel, fScreen, fScreenAtNewLine, fScreenInColor, fScreenThreshold, and Qw::kNormal.
Referenced by QwTrackingTree::_inittree(), QwTrackingTree::_readtree(), QwTrackingTreeSearch::_SearchTreeLines(), QwSubsystemArrayParity::AccumulateAllRunningSum(), QwSubsystemArrayParity::AccumulateRunningSum(), QwVQWK_Channel::AccumulateRunningSum(), VQwScaler_Channel::AccumulateRunningSum(), QwOptions::AddConfigFile(), QwEvent::AddHit(), QwSIS3320_Channel::AddLogicalAccumulator(), QwDBInterface::AddThisEntryToList(), QwErrDBInterface::AddThisEntryToList(), QwBeamMod::AnalyzeOpticsPlots(), QwVQWK_Channel::ApplyHWChecks(), QwTreeEventBuffer::AssignCrossSection(), QwSubsystemArray::AtEndOfEventLoop(), VQwSubsystem::AtEndOfEventLoop(), QwSubsystemArrayParity::Blind(), QwMatrixLookup::Bridge(), QwRayTracer::Bridge(), QwHelicity::BuildHelicityBitPattern(), QwHelicityPattern::CalculateAsymmetry(), QwCombinedBPM< T >::CalculateFixedParameter(), QwEvent::CalculateKinematics(), QwSubsystemArray::CanContain(), QwBlinder::CheckBlindability(), QwF1TDContainer::CheckDataIntegrity(), QwBlinder::CheckTestValues(), VQwCloneable< VQwDataElement >::Clone(), QwEventBuffer::CloseStream(), QwEventBuffer::CloseThisSegment(), QwHelicity::CollectRandBits24(), QwHelicity::CollectRandBits30(), QwScanner::Compare(), QwDatabase::Connect(), QwRegression::ConnectChannels(), QwTrackingTree::consistent(), QwEnergyCalculator::ConstructBranch(), QwHaloMonitor::ConstructBranch(), QwIntegratedRasterChannel< T >::ConstructBranch(), QwClock< T >::ConstructBranch(), QwCombinedPMT::ConstructBranch(), QwQPD::ConstructBranch(), QwBPMCavity::ConstructBranch(), QwLinearDiodeArray::ConstructBranch(), QwCombinedBPM< T >::ConstructBranch(), QwBPMStripline< T >::ConstructBranch(), QwIntegrationPMT::ConstructBranch(), QwBCM< T >::ConstructBranch(), QwSubsystemArray::ConstructBranch(), QwRootTree::ConstructBranchAndVector(), QwEPICSEvent::ConstructBranchAndVector(), QwVQWK_Channel::ConstructBranchAndVector(), QwHelicity::ConstructHistograms(), QwRootFile::ConstructHistograms(), QwRootTree::ConstructNewTree(), VQwClock::Create(), VQwBCM::Create(), VQwBCM::CreateCombo(), VQwBPM::CreateCombo(), QwTreeEventBuffer::CreateHitList(), QwTreeEventBuffer::CreateHitRegion1(), QwTreeEventBuffer::CreateHitRegion2(), QwTreeEventBuffer::CreateHitRegion3(), QwTreeEventBuffer::CreatePartialTracks(), VQwBPM::CreateStripline(), QwEventBuffer::DataFileIsSegmented(), QwSubsystemArrayParity::DeaccumulateRunningSum(), QwEventBuffer::DecodeSubbankHeader(), QwEPICSEvent::DetermineIHWPPolarity(), QwDBInterface::DetermineMeasurementTypeID(), QwPartialTrack::DeterminePositionInDetector(), QwPartialTrack::DeterminePositionInTarget(), QwHelicity::EncodeEventData(), QwMainCerenkovDetector::ExchangeProcessedData(), QwBeamMod::ExchangeProcessedData(), QwLumi::ExchangeProcessedData(), QwRootTree::Fill(), QwEPICSEvent::FillDB(), QwRegression::FillDB(), QwBlinder::FillDB(), QwMainCerenkovDetector::FillDB(), QwBeamLine::FillDB(), QwIntegratedRaster::FillDB(), QwLumi::FillDB(), QwBeamMod::FillDB_MPS(), QwEventBuffer::FillEPICSData(), QwBlinder::FillErrDB(), QwMainCerenkovDetector::FillErrDB(), QwBeamLine::FillErrDB(), QwIntegratedRaster::FillErrDB(), QwLumi::FillErrDB(), QwDriftChamberHDC::FillHistograms(), QwDriftChamberVDC::FillHistograms(), QwHelicity::FillHistograms(), QwParityDB::FillParameterFiles(), QwEPICSEvent::FillSlowControlsData(), QwEPICSEvent::FillSlowControlsSettings(), QwEPICSEvent::FillSlowControlsStrigs(), QwEventBuffer::FillSubsystemConfigurationData(), QwRootTree::FillTreeBranches(), QwSIS3320_Accumulator::FillTreeVector(), QwEPICSEvent::FillTreeVector(), VQwScaler_Channel::FillTreeVector(), QwBridgingTrackFilter::Filter(), QwParameterFile::FindFile(), QwParityDB::GetAnalysisID(), VQwScaler_Channel::GetBufferOffset(), QwVQWK_Channel::GetBufferOffset(), QwPartialTrack::GetChiWeight(), QwTreeLine::GetChiWeight(), QwMainCerenkovDetector::GetCombinedPMT(), QwLumi::GetCombinedPMT(), QwMagneticField::GetCylindricalFieldValue(), QwDetectorInfo::GetElementEfficiency(), QwTreeEventBuffer::GetEntry(), getenv_safe(), QwParityDB::GetErrorCodeID(), VQwFactory< VQwDataElement >::GetFactory(), QwMagneticField::GetFieldValue(), QwHistogramHelper::GetHistParamsFromFile(), QwHistogramHelper::GetHistParamsFromLine(), QwHistogramHelper::GetHistParamsFromList(), QwEvent::GetHitContainer(), QwMainCerenkovDetector::GetIntegrationPMT(), QwParityDB::GetLumiDetectorID(), QwParityDB::GetMainDetectorID(), QwParityDB::GetMeasurementID(), QwParityDB::GetMonitorID(), QwTreeEventBuffer::GetNextEvent(), QwEventBuffer::GetNextEvent(), QwEventBuffer::GetNextEventRange(), QwEventBuffer::GetNextRunRange(), VQwSubsystem::GetParent(), QwHelicity::GetRandbit24(), QwHelicity::GetRandbit30(), QwHelicity::GetRandomSeed(), QwParityDB::GetRunID(), QwParityDB::GetRunletID(), QwParityDB::GetSlowControlDetectorID(), QwOptions::GetValue(), QwParameterFile::HasValue(), QwBlinder::InitBlinders(), Uv2xy::InitializeRotationMatrices(), QwBlinder::InitTestValues(), QwTrackingTree::inittree(), QwTrackingWorker::InitTree(), QwHelicity::IsGoodEventNumber(), QwHelicity::IsGoodHelicity(), QwHelicity::IsGoodPatternNumber(), QwHelicity::IsGoodPhaseNumber(), QwRegression::LinearRegression(), QwOptions::ListConfigFiles(), QwTreeEventBuffer::ListCrossSections(), QwSubsystemArray::ListPublishedValues(), VQwFactory< VQwDataElement >::ListRegisteredTypes(), QwEvent::LoadBeamProperty(), QwScaler::LoadChannelMap(), QwEPICSEvent::LoadChannelMap(), QwRegression::LoadChannelMap(), QwHelicity::LoadChannelMap(), QwComptonPhotonDetector::LoadChannelMap(), QwBeamLine::LoadChannelMap(), QwMainCerenkovDetector::LoadChannelMap(), QwIntegratedRaster::LoadChannelMap(), QwBeamMod::LoadChannelMap(), QwLumi::LoadChannelMap(), QwVQWK_Channel::LoadChannelParameters(), QwDetectorInfo::LoadCrosstalkDefinition(), VQwSubsystemTracking::LoadCrosstalkDefinition(), QwBeamLine::LoadEventCuts(), QwMainCerenkovDetector::LoadEventCuts(), QwIntegratedRaster::LoadEventCuts(), QwBeamMod::LoadEventCuts(), QwLumi::LoadEventCuts(), QwHelicityPattern::LoadEventData(), QwBeamLine::LoadGeometryDefinition(), VQwSubsystemTracking::LoadGeometryDefinition(), QwHistogramHelper::LoadHistParamsFromFile(), QwScaler::LoadInputParameters(), QwComptonPhotonDetector::LoadInputParameters(), QwSubsystemArray::LoadSubsystemsFromParameterFile(), QwMatrixLookup::LoadTrajMatrix(), QwHistogramHelper::LoadTreeParamsFromFile(), main(), QwTrackingTree::marklin(), QwHistogramHelper::MatchDeviceParamsFromList(), QwTrackingTreeMatch::MatchRegion3(), QwHistogramHelper::MatchVQWKElementFromList(), QwTrackingTree::nodeexists(), QwEventBuffer::OpenDataFile(), QwTreeEventBuffer::OpenFile(), QwParameterFile::OpenFile(), QwEventBuffer::OpenNextSegment(), QwEventBuffer::OpenNextStream(), StoreMonitorID::operator()(), StoreMainDetectorID::operator()(), StoreLumiDetectorID::operator()(), StoreMeasurementID::operator()(), StoreSlowControlDetectorID::operator()(), StoreErrorCodeID::operator()(), QwScanner::operator+=(), QwSubsystemArrayParity::operator+=(), QwHelicity::operator+=(), QwScanner::operator-=(), VQwScaler_Channel::operator/=(), QwVQWK_Channel::operator/=(), QwScanner::operator=(), QwSubsystemArrayParity::operator=(), QwOptions::ParseCommandLine(), QwOptions::ParseConfigFile(), QwOptions::ParseEnvironment(), QwParameterFile::ParseIntRange(), QwEventRing::pop(), QwWord::Print(), QwTracking::shortnode::Print(), QwTracking::shorttree::Print(), QwPartialTrack::Print(), QwTracking::treenode::Print(), QwHelicity::Print(), QwBeamMod::Print(), QwGeometry::Print(), QwHelicityPattern::Print(), QwRootTree::Print(), VQwTrackingElementContainer< T >::Print(), QwDetectorInfo::Print(), QwModChannelID::Print(), QwF1TDContainer::Print(), QwEvent::Print(), QwHelicityPattern::PrintBurstAverage(), QwF1TDC::PrintChannelErrorCounter(), VQwSubsystem::PrintDetectorMaps(), QwRootFile::PrintDirs(), QwF1TDC::PrintErrorCounter(), QwVQWK_Channel::PrintErrorCounterHead(), QwHelicity::PrintErrorCounters(), QwBeamLine::PrintErrorCounters(), QwMainCerenkovDetector::PrintErrorCounters(), QwIntegratedRaster::PrintErrorCounters(), QwLumi::PrintErrorCounters(), VQwScaler_Channel::PrintErrorCounters(), QwVQWK_Channel::PrintErrorCounters(), QwVQWK_Channel::PrintErrorCounterTail(), QwBlinder::PrintFinalValues(), QwTrackingTree::PrintHashTable(), QwHistogramHelper::PrintHistParams(), MQwF1TDC::PrintHitFIFOStatus(), QwWord::PrintID(), PrintInfo(), QwScaler::PrintInfo(), QwComptonPhotonDetector::PrintInfo(), QwSIS3320_Channel::PrintInfo(), QwIntegratedRaster::PrintInfo(), QwLumi::PrintInfo(), VQwScaler_Channel::PrintInfo(), QwTrackingTreeRegion::PrintNodes(), MQwF1TDC::PrintOutputFIFOStatus(), QwTrack::PrintPartialTracks(), MQwF1TDC::PrintResolutionLockStatus(), QwHelicityPattern::PrintRunningAverage(), QwHelicityPattern::PrintRunningBurstAverage(), QwEventBuffer::PrintRunTimes(), QwTreeEventBuffer::PrintStatInfo(), QwDBInterface::PrintStatus(), QwErrDBInterface::PrintStatus(), QwF1TDC::PrintTotalErrorCounter(), QwTrackingTree::PrintTree(), QwTrackingTreeRegion::PrintTrees(), QwRootFile::PrintTrees(), QwPartialTrack::PrintValid(), QwPMT_Channel::PrintValue(), QwRegression::PrintValue(), QwBeamLine::PrintValue(), QwSIS3320_Channel::PrintValue(), QwIntegratedRaster::PrintValue(), QwLumi::PrintValue(), VQwScaler_Channel::PrintValue(), QwComptonElectronDetector::PrintValue(), QwMainCerenkovDetector::PrintValue(), QwVQWK_Channel::PrintValue(), QwEPICSEvent::PrintVariableList(), QwSIS3320_Accumulator::ProcessEvBuffer(), QwComptonPhotonDetector::ProcessEvBuffer(), QwHelicity::ProcessEvBuffer(), QwSIS3320_Channel::ProcessEvBuffer(), QwSIS3320_Samples::ProcessEvBuffer(), QwBeamMod::ProcessEvBuffer(), QwComptonElectronDetector::ProcessEvBuffer(), QwCombinedBCM< T >::ProcessEvent(), QwHelicity::ProcessEvent(), VQwScaler_Channel::ProcessEvent(), QwTrackingWorker::ProcessEvent(), QwVQWK_Channel::ProcessEvent(), QwMainCerenkovDetector::ProcessEvent_2(), QwLumi::ProcessEvent_2(), QwHelicity::ProcessEventInputMollerMode(), QwHelicity::ProcessEventInputRegisterMode(), QwHelicity::ProcessEventUserbitMode(), QwHistogramHelper::ProcessOptions(), QwHelicityPattern::ProcessOptions(), QwHelicity::ProcessOptions(), QwDatabase::ProcessOptions(), QwEventBuffer::ProcessOptions(), QwMainCerenkovDetector::ProcessOptions(), QwLumi::ProcessOptions(), QwBlinder::ProcessOptions(), QwRootFile::ProcessOptions(), QwLumi::PublishByRequest(), QwSubsystemArray::PublishByRequest(), VQwSubsystem::PublishInternalValue(), QwSubsystemArray::PublishInternalValue(), QwBeamLine::PublishInternalValues(), QwMainCerenkovDetector::PublishInternalValues(), QwEventRing::push(), QwSubsystemArray::push_back(), QwDatabase::QwDatabase(), QwEventBuffer::QwEventBuffer(), QwHelicityPattern::QwHelicityPattern(), QwMagneticField::QwMagneticField(), QwParameterFile::QwParameterFile(), QwParityDB::QwParityDB(), QwRegressionSubsystem::QwRegressionSubsystem(), QwRootFile::QwRootFile(), QwRootTree::QwRootTree(), QwSubsystemArray::QwSubsystemArray(), QwTrackingWorker::QwTrackingWorker(), QwTrackingTreeCombine::r2_PartialTrackFit(), QwTrackingTreeCombine::r3_PartialTrackFit(), QwSubsystemArrayParity::Ratio(), QwMagneticField::ReadFieldMap(), QwMagneticField::ReadFieldMapFile(), QwMagneticField::ReadFieldMapStream(), QwMagneticField::ReadFieldMapZip(), QwBlinder::ReadSeed(), QwTrackingTree::readtree(), VQwSubsystem::RegisterROCNumber(), VQwSubsystem::RegisterSubbank(), QwBeamDetectorID::ReportInitErrors(), MQwCodaControlEvent::ReportRunSummary(), QwHelicity::ResetPredictor(), QwSubsystemArray::ReturnInternalValue(), QwHelicity::RunPredictor(), QwTrackingTreeSearch::SearchTreeLines(), QwDatabase::SetAccessLevel(), QwParityDB::SetAnalysisID(), Uv2xy::SetAngleUVinXY(), QwOptions::SetCommandLine(), QwDetectorInfo::SetElementEfficiency(), QwHelicity::SetHelicityBitPattern(), QwHelicity::SetHelicityDelay(), QwBlinder::SetIHWPPolarity(), QwTracking::shortnode::SetNext(), QwTracking::nodenode::SetNext(), QwTracking::treenode::SetNext(), Uv2xy::SetOffset(), QwParityDB::SetRunID(), QwParityDB::SetRunletID(), QwParityDB::SetRunNumber(), QwEnergyCalculator::SetSingleEventCuts(), QwCombinedPMT::SetSingleEventCuts(), QwClock< T >::SetSingleEventCuts(), QwIntegratedRasterChannel< T >::SetSingleEventCuts(), VQwBPM::SetSingleEventCuts(), VQwHardwareChannel::SetSingleEventCuts(), QwBCM< T >::SetSingleEventCuts(), QwIntegrationPMT::SetSingleEventCuts(), QwF1TDContainer::SetSystemName(), QwBlinder::SetTargetBlindability(), QwTracking::nodenode::SetTree(), QwParityDB::SetupOneRun(), QwBlinder::SetWienState(), Uv2xy::SetWireSpacing(), QwComptonPhotonDetector::SingleEventCuts(), QwParameterFile::SkipSection(), sql_create_6(), QwDatabase::StoreDBVersion(), QwParityDB::StoreErrorCodeIDs(), QwParityDB::StoreLumiDetectorIDs(), QwParityDB::StoreMainDetectorIDs(), QwParityDB::StoreMeasurementIDs(), QwParityDB::StoreMonitorIDs(), QwParityDB::StoreSlowControlDetectorIDs(), QwTrackingTreeCombine::TcTreeLineCombine(), QwMagneticField::TestFieldMap(), QwTrackingTreeCombine::TlCheckForX(), QwTrackingTreeCombine::TlMatchHits(), QwTrackingTreeCombine::TlTreeCombine(), QwTrackingTreeCombine::TlTreeLineSort(), QwBlinder::Update(), QwSubsystemArrayParity::UpdateErrorFlag(), QwOptions::Usage(), QwDatabase::ValidateConnection(), QwOptions::Version(), QwEPICSEvent::WriteEPICSStringValues(), QwEventBuffer::WriteEvent(), QwBlinder::WriteFinalValuesToDB(), QwBPMStripline< T >::WritePromptSummary(), QwIntegratedRaster::WritePromptSummary(), QwLumi::WritePromptSummary(), QwMainCerenkovDetector::WritePromptSummary(), QwMatrixLookup::WriteTrajMatrix(), QwTrackingTree::writetree(), QwDatabase::~QwDatabase(), QwParityDB::~QwParityDB(), QwRootFile::~QwRootFile(), QwTrackingTree::~QwTrackingTree(), QwTrackingTreeRegion::~QwTrackingTreeRegion(), and QwTrackingWorker::~QwTrackingWorker().
|
static |
Flush the streams.
Flush the streams
Definition at line 319 of file QwLog.cc.
References fFile, and fScreen.
Referenced by QwInterpolator< value_t, value_n >::ReadBinaryFile(), QwMagneticField::ReadFieldMapStream(), QwInterpolator< value_t, value_n >::ReadText(), QwInterpolator< value_t, value_n >::WriteBinaryFile(), and QwInterpolator< value_t, value_n >::WriteText().
|
private |
Get the local time.
Get the local time
Definition at line 332 of file QwLog.cc.
References fTimeString.
Referenced by operator()().
void QwLog::InitLogFile | ( | const std::string | name, |
const std::ios_base::openmode | mode = kAppend |
||
) |
Initialize the log file with name 'name'.
Initialize the log file with name 'name'
Definition at line 157 of file QwLog.cc.
References fFile, fFileThreshold, and kMessage.
Referenced by main(), and ProcessOptions().
bool QwLog::IsDebugFunction | ( | const string | func_sig | ) |
Determine whether the function name matches a specified list of regular expressions.
Determine whether the function name matches a specified list of regular expressions
Definition at line 137 of file QwLog.cc.
References fDebugFunctionRegexString, fIsDebugFunction, and regex.
Referenced by operator()().
QwLog & QwLog::operator() | ( | const QwLogLevel | level, |
const std::string | func_sig = "<unknown>" |
||
) |
Set the stream log level.
Set the stream log level
Definition at line 192 of file QwLog.cc.
References fFile, fFileAtNewLine, fFileThreshold, fLogLevel, fPrintFunctionSignature, fScreen, fScreenAtNewLine, fScreenInColor, fScreenThreshold, fUseColor, GetTime(), IsDebugFunction(), kAlways, kDebug, kError, kMessage, Qw::kNormal, Qw::kRed, kVerbose, and kWarning.
|
inline |
Stream an object to the output stream.
Definition at line 141 of file QwLog.h.
References fFile, fFileThreshold, fLogLevel, fScreen, and fScreenThreshold.
QwLog & QwLog::operator<< | ( | std::ostream &(*)(std::ostream &) | manip | ) |
Pass the ios_base manipulators.
Definition at line 280 of file QwLog.cc.
References fFileThreshold, fLogLevel, fScreen, and fScreenThreshold.
void QwLog::ProcessOptions | ( | QwOptions * | options | ) |
Process class options for QwOptions.
Process configuration options for logging class using QwOptions functionality.
Note: this uses a pointer as opposed to a reference, because as indicated above the QwLog class cannot depend on the QwOptions class. When using a pointer we only need a forward declaration and we do not need to include the header file QwOptions.h.
options | Options object |
Definition at line 108 of file QwLog.cc.
References fDebugFunctionRegexString, fPrintFunctionSignature, QwOptions::GetValue(), QwOptions::GetValueVector(), QwOptions::HasValue(), InitLogFile(), SetFileThreshold(), SetScreenColor(), and SetScreenThreshold().
Referenced by main().
void QwLog::SetFileThreshold | ( | int | thr | ) |
Set the file log level.
Set the file log level
Definition at line 185 of file QwLog.cc.
References fFileThreshold.
Referenced by main(), and ProcessOptions().
void QwLog::SetScreenColor | ( | bool | flag | ) |
Set the screen color mode.
Set the screen color mode
Definition at line 171 of file QwLog.cc.
References fUseColor.
Referenced by main(), and ProcessOptions().
void QwLog::SetScreenThreshold | ( | int | thr | ) |
Set the screen log level.
Set the screen log level
Definition at line 178 of file QwLog.cc.
References fScreenThreshold.
Referenced by main(), and ProcessOptions().
|
private |
Definition at line 187 of file QwLog.h.
Referenced by IsDebugFunction(), and ProcessOptions().
|
private |
Definition at line 178 of file QwLog.h.
Referenced by endl(), flush(), InitLogFile(), operator()(), operator<<(), QwLog(), and ~QwLog().
|
staticprivate |
Flags only relevant for current line, but static for use in static function.
Definition at line 193 of file QwLog.h.
Referenced by endl(), and operator()().
|
private |
File thresholds and stream.
Definition at line 177 of file QwLog.h.
Referenced by endl(), InitLogFile(), operator()(), operator<<(), QwLog(), and SetFileThreshold().
|
private |
List of regular expressions for functions that will have increased log level.
Definition at line 186 of file QwLog.h.
Referenced by IsDebugFunction().
|
private |
Log level of this stream.
Definition at line 180 of file QwLog.h.
Referenced by endl(), operator()(), operator<<(), and QwLog().
|
private |
Flag to print function signature on warning or error.
Definition at line 183 of file QwLog.h.
Referenced by operator()(), ProcessOptions(), and QwLog().
|
private |
Definition at line 175 of file QwLog.h.
Referenced by endl(), flush(), operator()(), operator<<(), and QwLog().
|
staticprivate |
Definition at line 195 of file QwLog.h.
Referenced by endl(), and operator()().
|
staticprivate |
Definition at line 194 of file QwLog.h.
Referenced by endl(), and operator()().
|
private |
Screen thresholds and stream.
Definition at line 174 of file QwLog.h.
Referenced by endl(), operator()(), operator<<(), QwLog(), and SetScreenThreshold().
|
private |
|
private |
Flag to disable color.
Definition at line 190 of file QwLog.h.
Referenced by operator()(), QwLog(), and SetScreenColor().
|
static |
|
static |