|
CPN
Computational Process Networks
|
Logger object that is used for forwarding log messages. More...
#include <Logger.h>
Inheritance diagram for Logger:
Collaboration diagram for Logger:Public Types | |
| enum | { ERROR = 100, WARNING = 75, INFO = 50, DEBUG = 25, TRACE = 0 } |
Public Member Functions | |
| Logger () | |
| Logger (int dfltlvl) | |
| Logger (LoggerOutput *lo, int dfltlvl) | |
| Logger (LoggerOutput *lo, int dfltlevel, const std::string &nm) | |
| virtual | ~Logger () |
| int | LogLevel () const |
| int | LogLevel (int level) |
| int | DefaultLevel () const |
| int | DefaultLevel (int level) |
| int | Adjust () const |
| int | Adjust (int a) |
| const std::string & | Name () const |
| const std::string & | Name (const std::string &nm) |
| LoggerOutput * | Output () |
| LoggerOutput * | Output (LoggerOutput *output) |
| virtual void | Log (int level, const std::string &msg) |
| Log a message to this outputer. More... | |
| void | Log (const std::string &msg) |
| void | Logf (int level, const char *fmt,...) |
| void | vLogf (int level, const char *fmt, va_list ap) |
| void | Logf (const char *fmt,...) |
| void | Error (const char *fmt,...) |
| void | Warn (const char *fmt,...) |
| void | Info (const char *fmt,...) |
| void | Debug (const char *fmt,...) |
| void | Trace (const char *fmt,...) |
Protected Member Functions | |
| Logger (const Logger &) | |
| Logger & | operator= (const Logger &) |
Private Attributes | |
| Sync::ReentrantLock | lock |
| LoggerOutput * | logout |
| int | loglevel |
| int | defaultlevel |
| int | adjust |
| std::string | name |
| anonymous enum |
| Enumerator | |
|---|---|
| ERROR | |
| WARNING | |
| INFO | |
| DEBUG | |
| TRACE | |
Definition at line 59 of file Logger.h.
| Logger::Logger | ( | ) |
Definition at line 34 of file Logger.cc.
| Logger::Logger | ( | int | dfltlvl | ) |
Definition at line 38 of file Logger.cc.
| Logger::Logger | ( | LoggerOutput * | lo, |
| int | dfltlvl | ||
| ) |
Definition at line 44 of file Logger.cc.
References ASSERT, LoggerOutput::LogLevel(), loglevel, and logout.
Here is the call graph for this function:| Logger::Logger | ( | LoggerOutput * | lo, |
| int | dfltlevel, | ||
| const std::string & | nm | ||
| ) |
Definition at line 51 of file Logger.cc.
References ASSERT, LoggerOutput::LogLevel(), loglevel, and logout.
Here is the call graph for this function:
|
protected |
| int Logger::Adjust | ( | ) | const |
Definition at line 78 of file Logger.cc.
Definition at line 83 of file Logger.cc.
| void Logger::Debug | ( | const char * | fmt, |
| ... | |||
| ) |
Definition at line 186 of file Logger.cc.
References DEBUG, lock, loglevel, and vLogf().
Referenced by CPN::QueueBase::Detect(), CPN::RemoteQueue::FileThreadEntryPoint(), CPN::RemoteQueue::InternalCheckStatus(), CPN::RemoteQueue::Read(), CPN::RemoteQueue::SendEndOfReadPacket(), and CPN::RemoteQueue::SendEndOfWritePacket().
Here is the call graph for this function:
Here is the caller graph for this function:| int Logger::DefaultLevel | ( | ) | const |
Definition at line 68 of file Logger.cc.
References defaultlevel, and lock.
Definition at line 73 of file Logger.cc.
References defaultlevel, and lock.
| void Logger::Error | ( | const char * | fmt, |
| ... | |||
| ) |
Definition at line 159 of file Logger.cc.
References ERROR, lock, loglevel, and vLogf().
Referenced by CPN::RemoteQueue::FileThreadEntryPoint(), CPN::RemoteQueue::HandleError(), CPN::RemoteQueue::InternalCheckStatus(), CPN::PseudoNode::LogState(), CPN::RemoteQueue::LogState(), CPN::ConnectionServer::LogState(), CPN::NodeBase::LogState(), CPN::QueueBase::LogState(), CPN::Kernel::LogState(), and CPN::ConnectionServer::Poll().
Here is the call graph for this function:
Here is the caller graph for this function:| void Logger::Info | ( | const char * | fmt, |
| ... | |||
| ) |
Definition at line 177 of file Logger.cc.
References INFO, lock, loglevel, and vLogf().
Referenced by CPN::NodeBase::EntryPoint(), and CPN::Kernel::Kernel().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Log a message to this outputer.
| level | the level of this message |
| msg | the message |
Implements LoggerOutput.
Definition at line 108 of file Logger.cc.
References adjust, lock, LoggerOutput::Log(), loglevel, logout, and name.
Referenced by vLogf().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 89 of file Logger.h.
References defaultlevel, and Log().
Referenced by Log().
Here is the call graph for this function:
Here is the caller graph for this function:| void Logger::Logf | ( | int | level, |
| const char * | fmt, | ||
| ... | |||
| ) |
| void Logger::Logf | ( | const char * | fmt, |
| ... | |||
| ) |
Definition at line 123 of file Logger.cc.
References defaultlevel, lock, loglevel, and vLogf().
Here is the call graph for this function:
|
virtual |
Implements LoggerOutput.
Definition at line 58 of file Logger.cc.
References lock, and loglevel.
Referenced by CPN::RemoteQueue::InternalCheckStatus(), and CPN::Kernel::Kernel().
Here is the caller graph for this function:| level | the new log level |
Implements LoggerOutput.
Definition at line 63 of file Logger.cc.
References lock, and loglevel.
| const std::string & Logger::Name | ( | ) | const |
Definition at line 88 of file Logger.cc.
Referenced by CPN::NodeBase::EntryPoint(), CPN::Kernel::Kernel(), CPN::QueueBase::QueueBase(), and CPN::RemoteQueue::RemoteQueue().
Here is the caller graph for this function:| const std::string & Logger::Name | ( | const std::string & | nm | ) |
Definition at line 93 of file Logger.cc.
| LoggerOutput * Logger::Output | ( | ) |
Definition at line 98 of file Logger.cc.
Referenced by CPN::Kernel::Kernel().
Here is the caller graph for this function:| LoggerOutput * Logger::Output | ( | LoggerOutput * | output | ) |
Definition at line 103 of file Logger.cc.
| void Logger::Trace | ( | const char * | fmt, |
| ... | |||
| ) |
Definition at line 195 of file Logger.cc.
References lock, loglevel, TRACE, and vLogf().
Referenced by CPN::RemoteQueue::RemoteQueue(), ScopeTrace::ScopeTrace(), CPN::RemoteQueue::~RemoteQueue(), and ScopeTrace::~ScopeTrace().
Here is the call graph for this function:
Here is the caller graph for this function:| void Logger::vLogf | ( | int | level, |
| const char * | fmt, | ||
| va_list | ap | ||
| ) |
Definition at line 132 of file Logger.cc.
References lock, Log(), and loglevel.
Referenced by Debug(), Error(), Info(), Logf(), Trace(), and Warn().
Here is the call graph for this function:
Here is the caller graph for this function:| void Logger::Warn | ( | const char * | fmt, |
| ... | |||
| ) |
Definition at line 168 of file Logger.cc.
References lock, loglevel, vLogf(), and WARNING.
Referenced by CPN::RemoteQueue::EnqueuePacket(), CPN::Kernel::EntryPoint(), and CPN::Kernel::NodeTerminated().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
|
private |
Definition at line 110 of file Logger.h.
Referenced by DefaultLevel(), Log(), and Logf().
|
private |
|
private |
|
private |
|
private |
1.8.5