#include <MsgFormatter.h>
Public Member Functions | |
MsgFormatter (const std::string &fmt="", const std::string &timefmt="") | |
virtual | ~MsgFormatter () |
virtual void | addFormat (MsgLogLevel level, const std::string &fmt) |
virtual void | format (const MsgLogRecord &rec, std::ostream &out) |
Static Public Member Functions | |
static void | addGlobalFormat (const std::string &fmt) |
static void | addGlobalFormat (MsgLogLevel level, const std::string &fmt) |
Protected Member Functions | |
virtual const std::string & | getFormat (MsgLogLevel level) const |
This software was developed for the BaBar collaboration. If you use all or part of it, please give an appropriate acknowledgement.
Copyright (C) 2005 SLAC
Definition at line 78 of file MsgFormatter.h.
MsgLogger::MsgFormatter::MsgFormatter | ( | const std::string & | fmt = "" , |
|
const std::string & | timefmt = "" | |||
) |
MsgLogger::MsgFormatter::~MsgFormatter | ( | ) | [virtual] |
Definition at line 116 of file MsgFormatter.cpp.
void MsgLogger::MsgFormatter::addFormat | ( | MsgLogLevel | level, | |
const std::string & | fmt | |||
) | [virtual] |
void MsgLogger::MsgFormatter::addGlobalFormat | ( | MsgLogLevel | level, | |
const std::string & | fmt | |||
) | [static] |
Definition at line 128 of file MsgFormatter.cpp.
References MsgLogger::MsgLogLevel::code(), and s_appFmtMap.
void MsgLogger::MsgFormatter::addGlobalFormat | ( | const std::string & | fmt | ) | [static] |
Definition at line 122 of file MsgFormatter.cpp.
References MsgLogger::MsgLogLevel::LAST_LEVEL, and s_appFmtMap.
Referenced by psana::PSAnaApp::preRunApp().
void MsgLogger::MsgFormatter::format | ( | const MsgLogRecord & | rec, | |
std::ostream & | out | |||
) | [virtual] |
Definition at line 142 of file MsgFormatter.cpp.
References MsgLogger::MsgLogRecord::fileName(), formattedTime(), getFormat(), MsgLogger::MsgLogRecord::level(), MsgLogger::MsgLogLevel::level3(), MsgLogger::MsgLogLevel::levelLetter(), MsgLogger::MsgLogRecord::lineNum(), MsgLogger::MsgLogRecord::logger(), and MsgLogger::MsgLogRecord::msgbuf().
Referenced by MsgLogger::MsgHandlerStdStreams::log().
const std::string & MsgLogger::MsgFormatter::getFormat | ( | MsgLogLevel | level | ) | const [protected, virtual] |
Definition at line 233 of file MsgFormatter.cpp.
References MsgLogger::MsgLogLevel::code(), s_appFmtMap, s_defFmt, and s_envFmtMap.
Referenced by format().