MsgLogger::MsgLogRecord Class Reference
[C++ Message Logging Facility]

#include <MsgLogRecord.h>

List of all members.

Public Member Functions

 MsgLogRecord (const std::string &logger, MsgLogLevel level, const char *fileName, int linenum, std::streambuf *msgbuf)
 ~MsgLogRecord ()
const std::string & logger () const
 get logger name
MsgLogLevel level () const
 get message log level
const char * fileName () const
 get message location
int lineNum () const
std::streambuf * msgbuf () const
 get the stream for the specified log level


Detailed Description

Class which defines a single logging message (record.) It has such attributes as message itself, logging level, corresponding logger name, file/line where the message originated. For performance optimization purposes the message is passed as a pointer to the streambuf. This complicates things a bit, you have to be careful when extracting message test from the streambuf, but avoids copying of the strings. Also for optimization reasons the timestamp is not a part of the message, but is added to the formatted message only during formatting (only if needed.)

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

See also:
MsgLogRecordMsgLogRecord
Version:
Id
MsgLogRecord.h 2700 2011-12-09 21:52:07Z salnikov@SLAC.STANFORD.EDU
Author:
Andy Salnikov

Definition at line 80 of file MsgLogRecord.h.


Constructor & Destructor Documentation

MsgLogger::MsgLogRecord::MsgLogRecord ( const std::string &  logger,
MsgLogLevel  level,
const char *  fileName,
int  linenum,
std::streambuf *  msgbuf 
) [inline]

Definition at line 85 of file MsgLogRecord.h.

MsgLogger::MsgLogRecord::~MsgLogRecord (  )  [inline]

Definition at line 94 of file MsgLogRecord.h.


Member Function Documentation

const char* MsgLogger::MsgLogRecord::fileName (  )  const [inline]

get message location

Definition at line 103 of file MsgLogRecord.h.

Referenced by MsgLogger::MsgFormatter::format().

MsgLogLevel MsgLogger::MsgLogRecord::level (  )  const [inline]

get message log level

Definition at line 100 of file MsgLogRecord.h.

Referenced by MsgLogger::MsgFormatter::format(), MsgLogger::MsgLoggerImpl::log(), and MsgLogger::MsgHandlerStdStreams::log().

int MsgLogger::MsgLogRecord::lineNum (  )  const [inline]

Definition at line 104 of file MsgLogRecord.h.

Referenced by MsgLogger::MsgFormatter::format().

const std::string& MsgLogger::MsgLogRecord::logger (  )  const [inline]

get logger name

Definition at line 97 of file MsgLogRecord.h.

Referenced by MsgLogger::MsgFormatter::format().

std::streambuf* MsgLogger::MsgLogRecord::msgbuf (  )  const [inline]

get the stream for the specified log level

Definition at line 107 of file MsgLogRecord.h.

Referenced by MsgLogger::MsgFormatter::format().


The documentation for this class was generated from the following file:
Generated on 19 Dec 2016 for PSANAclasses by  doxygen 1.4.7