Vault  4.1
Classes | Defines | Typedefs
vlogger.h File Reference
#include "vtypes.h"
#include "vmutex.h"
#include "vbufferedfilestream.h"
#include "vtextiostream.h"

Go to the source code of this file.

Classes

class  VLogAppender
 VLogAppender is an abstract base class that defines the API for writing output to a destination. More...
class  VLoggerRepetitionFilter
 VLoggerRepetitionFilter provides VLogger a simple way of preventing runaway repetitive log output. More...
class  VLoggerPrintStackConfig
 This class encapsulates the configuration and state for when a named logger should decide to emit a stack trace upon emitting a message. More...
class  VNamedLogger
 VNamedLogger defines an object to which log output is initially sent. More...
class  VLogAppenderFactory
 The abstract base class is what you implement to allow an appender class to be dynamically instantiated from settings, typically during a call to configure() at startup. More...
class  VLoggerLevel
 This class holds the constants defining the log levels. More...
class  VLogger
 The VLogger class provides the static APIs for configuring the logging system, adding, removing, and finding appenders and loggers, etc. More...
class  VCoutLogAppender
 An appender that emits to the console using the std::cout stream. More...
class  VFileLogAppender
 An appender that emits to one big file. More...
class  VRollingFileLogAppender
 Not yet implemented. More...
class  VSilentLogAppender
 An appender that discards everything emitted to it. More...
class  VStringLogAppender
 An appender that appends each emitted message to a multi-line string instance variable that can be obtained afterwards. More...
class  VStringVectorLogAppender
 An appender that appends each emitted message to a string list that can be obtained afterwards. More...
class  VStringLogger
 A special logger subclass meant to be declared on the stack (not "registered") and explicitly logged to, which uses an embedded VStringLogAppender to capture the emitted messages to a multi-line string. More...
class  VStringVectorLogger
 A special logger subclass meant to be declared on the stack (not "registered") and explicitly logged to, which uses an embedded VStringVectorLogAppender to capture the emitted messages to a string list. More...

Defines

#define VLOGGER_LEVEL(level, message)   do { if (!VLogger::isDefaultLogLevelActive(level)) break; VLogger::getDefaultLogger()->log(level, NULL, 0, message, VString::EMPTY()); } while (false)
#define VLOGGER_LEVEL_FILELINE(level, message, file, line)   do { if (!VLogger::isDefaultLogLevelActive(level)) break; VLogger::getDefaultLogger()->log(level, file, line, message, VString::EMPTY()); } while (false)
#define VLOGGER_LINE(level, message)   VLOGGER_LEVEL_FILELINE(level, message, __FILE__, __LINE__)
#define VLOGGER_FATAL_AND_THROW(message)   do { VLogger::getDefaultLogger()->log(VLoggerLevel::FATAL, __FILE__, __LINE__, message); throw VStackTraceException(message); } while (false)
#define VLOGGER_FATAL(message)   VLOGGER_LEVEL_FILELINE(VLoggerLevel::FATAL, message, __FILE__, __LINE__)
#define VLOGGER_ERROR(message)   VLOGGER_LEVEL_FILELINE(VLoggerLevel::ERROR, message, __FILE__, __LINE__)
#define VLOGGER_WARN(message)   VLOGGER_LEVEL(VLoggerLevel::WARN, message)
#define VLOGGER_INFO(message)   VLOGGER_LEVEL(VLoggerLevel::INFO, message)
#define VLOGGER_DEBUG(message)   VLOGGER_LEVEL(VLoggerLevel::DEBUG, message)
#define VLOGGER_TRACE(message)   VLOGGER_LEVEL(VLoggerLevel::TRACE, message)
#define VLOGGER_HEXDUMP(level, message, buffer, length)   do { if (!VLogger::isDefaultLogLevelActive(level)) break; VLogger::getDefaultLogger()->logHexDump(level, message, VString::EMPTY(), buffer, length); } while (false)
#define VLOGGER_WOULD_LOG(level)   (VLogger::isDefaultLogLevelActive(level))
#define VLOGGER_NAMED_LEVEL(loggername, level, message)   do { if (!VLogger::isLogLevelActive(level)) break; VNamedLoggerPtr nl = VLogger::findNamedLoggerForLevel(loggername, level); if (nl != nullptr) nl->log(level, NULL, 0, message, loggername); } while (false)
#define VLOGGER_NAMED_LEVEL_FILELINE(loggername, level, message, file, line)   do { if (!VLogger::isLogLevelActive(level)) break; VNamedLoggerPtr nl = VLogger::findNamedLoggerForLevel(loggername, level); if (nl != nullptr) nl->log(level, file, line, message, loggername); } while (false)
#define VLOGGER_NAMED_LINE(loggername, level, message)   VLOGGER_NAMED_LEVEL_FILELINE(loggername, level, message, __FILE__, __LINE__)
#define VLOGGER_NAMED_FATAL(loggername, message)   VLOGGER_NAMED_LEVEL_FILELINE(loggername, VLoggerLevel::FATAL, message, __FILE__, __LINE__)
#define VLOGGER_NAMED_ERROR(loggername, message)   VLOGGER_NAMED_LEVEL_FILELINE(loggername, VLoggerLevel::ERROR, message, __FILE__, __LINE__)
#define VLOGGER_NAMED_WARN(loggername, message)   VLOGGER_NAMED_LEVEL(loggername, VLoggerLevel::WARN, message)
#define VLOGGER_NAMED_INFO(loggername, message)   VLOGGER_NAMED_LEVEL(loggername, VLoggerLevel::INFO, message)
#define VLOGGER_NAMED_DEBUG(loggername, message)   VLOGGER_NAMED_LEVEL(loggername, VLoggerLevel::DEBUG, message)
#define VLOGGER_NAMED_TRACE(loggername, message)   VLOGGER_NAMED_LEVEL(loggername, VLoggerLevel::TRACE, message)
#define VLOGGER_NAMED_HEXDUMP(loggername, level, message, buffer, length)   do { if (!VLogger::isLogLevelActive(level)) break; VNamedLoggerPtr nl = VLogger::findNamedLoggerForLevel(loggername, level); if (nl != nullptr) nl->logHexDump(level, message, loggername, buffer, length); } while (false)
#define VLOGGER_NAMED_WOULD_LOG(loggername, level)   (VLogger::isLogLevelActive(level) && (VLogger::findNamedLoggerForLevel(loggername, level) != nullptr))
#define VLOGGER_APPENDER_EMIT(appender, level, message)   do { (appender).emit(level, (level <= VLoggerLevel::ERROR) ? __FILE__ : NULL, (level <= VLoggerLevel::ERROR) ? __LINE__ : 0, true, message, VString::EMPTY(), VString::EMPTY(), false, VString::EMPTY()); } while (false)
#define VLOGGER_APPENDER_EMIT_FILELINE(appender, level, message, file, line)   do { (appender).emit(level, file, line, true, message, VString::EMPTY(), VString::EMPTY(), false, VString::EMPTY()); } while (false)

Typedefs

typedef VSharedPtr< VLogAppenderVLogAppenderPtr
typedef VSharedPtr< const
VLogAppender
VLogAppenderConstPtr
typedef std::vector
< VLogAppenderPtr > 
VLogAppenderPtrList
typedef VSharedPtr< VNamedLoggerVNamedLoggerPtr
typedef VSharedPtr< const
VNamedLogger
VNamedLoggerConstPtr
typedef VSharedPtr< const
VLogAppenderFactory
VLogAppenderFactoryPtr
typedef VSharedPtr< VStringLoggerVStringLoggerPtr
typedef VSharedPtr< const
VStringLogger
VStringLoggerConstPtr
typedef VSharedPtr
< VStringVectorLogger
VStringVectorLoggerPtr
typedef VSharedPtr< const
VStringVectorLogger
VStringVectorLoggerConstPtr

Detailed Description

Definition in file vlogger.h.


Copyright ©1997-2014 Trygve Isaacson. All rights reserved. This documentation was generated with Doxygen.