Back to index

nux  3.0.0
Classes | Namespaces | Defines | Typedefs | Enumerations | Functions
Logger.h File Reference
#include <ostream>
#include <string>
#include <boost/shared_ptr.hpp>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  nux::logging::LogStream
class  nux::logging::Logger
class  nux::logging::BlockTracer
 This class is used to log the entry and exit of a block. More...

Namespaces

namespace  nux
 The Writer singleton is responsible for controlling where the logging message go.
namespace  nux::logging

Defines

#define LOG_TRACE(logger)
#define LOG_DEBUG(logger)
#define LOG_INFO(logger)
#define LOG_WARN(logger)   LOG_WARNING(logger)
#define LOG_WARNING(logger)
#define LOG_ERROR(logger)
#define LOG_TRACE_BLOCK(logger)   ::nux::logging::BlockTracer _block_tracer_ ## __LINE__ (logger, ::nux::logging::Trace, __PRETTY_FUNCTION__, __FILE__, __LINE__)
#define LOG_DEBUG_BLOCK(logger)   ::nux::logging::BlockTracer _block_tracer_ ## __LINE__ (logger, ::nux::logging::Debug, __PRETTY_FUNCTION__, __FILE__, __LINE__)

Typedefs

typedef boost::shared_ptr
< LoggerModule > 
nux::logging::LoggerModulePtr

Enumerations

enum  nux::logging::Level {
  nux::logging::NotSpecified, nux::logging::Trace, nux::logging::Debug, nux::logging::Info,
  nux::logging::Warning, nux::logging::Error, nux::logging::Critical
}

Functions

Level nux::logging::get_logging_level (std::string level)
void nux::logging::configure_logging (const char *config_string)
 Configure multiple logging modules.
std::string nux::logging::Backtrace (int levels=-1)
void nux::logging::reset_logging ()
 A helper function for testing.
std::string nux::logging::dump_logging_levels (std::string const &prefix)

Define Documentation

#define LOG_DEBUG (   logger)
Value:
if (!logger.IsDebugEnabled()) {} \
  else ::nux::logging::LogStream(::nux::logging::Debug, logger.module(), __FILE__, __LINE__).stream()

Definition at line 36 of file Logger.h.

#define LOG_DEBUG_BLOCK (   logger)    ::nux::logging::BlockTracer _block_tracer_ ## __LINE__ (logger, ::nux::logging::Debug, __PRETTY_FUNCTION__, __FILE__, __LINE__)

Definition at line 56 of file Logger.h.

#define LOG_ERROR (   logger)
Value:
if (!logger.IsErrorEnabled()) {} \
  else ::nux::logging::LogStream(::nux::logging::Error, logger.module(), __FILE__, __LINE__).stream()

Definition at line 46 of file Logger.h.

#define LOG_INFO (   logger)
Value:
if (!logger.IsInfoEnabled()) {} \
  else ::nux::logging::LogStream(::nux::logging::Info, logger.module(), __FILE__, __LINE__).stream()

Definition at line 39 of file Logger.h.

#define LOG_TRACE (   logger)
Value:
if (!logger.IsTraceEnabled()) {} \
  else ::nux::logging::LogStream(::nux::logging::Trace, logger.module(), __FILE__, __LINE__).stream()

Definition at line 33 of file Logger.h.

#define LOG_TRACE_BLOCK (   logger)    ::nux::logging::BlockTracer _block_tracer_ ## __LINE__ (logger, ::nux::logging::Trace, __PRETTY_FUNCTION__, __FILE__, __LINE__)

Definition at line 55 of file Logger.h.

#define LOG_WARN (   logger)    LOG_WARNING(logger)

Definition at line 42 of file Logger.h.

#define LOG_WARNING (   logger)
Value:
if (!logger.IsWarningEnabled()) {} \
  else ::nux::logging::LogStream(::nux::logging::Warning, logger.module(), __FILE__, __LINE__).stream()

Definition at line 43 of file Logger.h.