1 #ifndef SLIC_LOGSTREAM_HH_
2 #define SLIC_LOGSTREAM_HH_ 1
40 static std::string
levelNames[
LOG::nlevels] = {
"NONE",
"ALWAYS",
"FATAL",
"ERROR",
"WARNING",
"OKAY",
"VERBOSE",
"DEBUG" };
221 m_fos =
new ofstream();
222 m_fos->open(file.c_str(), ios::app | ios::out);
295 void log(
const std::string& mesg) {
303 void debug(
const std::string& mesg) {
319 void okay(
const std::string& mesg) {
335 void error(
const std::string& mesg) {
343 void fatal(
const std::string& mesg) {
456 for (
typename std::vector<T>::const_iterator i = v.begin(); i != v.end(); ++i) {
493 long flags(std::ios_base::fmtflags v) {
502 long setf(std::ios_base::fmtflags v) {
578 long setf(std::ios_base::fmtflags _f, std::ios_base::fmtflags _m) {
586 void unsetf(std::ios_base::fmtflags _l) {
596 void clear(std::ios_base::iostate _i = std::ios_base::failbit) {
static std::string levelNames[LOG::nlevels]
Manages LogStreams and their associated LogMessenger objects.
A class for streaming messages to a log.
LogStream(std::string name, LOG::ELevel level, ostream *os=&std::cout)
void verbose(const std::string &mesg)
LOG::ELevel m_outputLevel
void log(const std::string &mesg)
void clear(std::ios_base::iostate _i=std::ios_base::failbit)
void setCurrentLevel(LOG::ELevel level)
void warning(const std::string &mesg)
long flags(std::ios_base::fmtflags v)
long setf(std::ios_base::fmtflags v)
void setOutputLevel(const LOG::ELevel &outputLevel)
void debug(const std::string &mesg)
LOG::ELevel getOutputLevel() const
long setf(std::ios_base::fmtflags _f, std::ios_base::fmtflags _m)
void error(const std::string &mesg)
const std::string & getName() const
void setActive(bool active)
LOG::ELevel getCurrentLevel() const
void okay(const std::string &mesg)
void unsetf(std::ios_base::fmtflags _l)
void log(const std::string &message, const LOG::ELevel &level)
ostream & getOutputStream() const
void always(const std::string &mesg)
LogStream & operator<<(const LOG::ELevel &level)
LogStream & operator<<(const T &arg)
LOG::ELevel m_currentMessageLevel
void fatal(const std::string &mesg)
void setOutputFile(const std::string &file)
static std::string getAscTime()