libmoost
moost::logging Namespace Reference

Namespaces

namespace  detail

Classes

class  global
 Initialise the global logging API. More...
class  global_scoped_logger
 handles scoped logging gracefully across the whole project. global_scoped_logger takes a scoped_logger and makes it available across the whole project without having to pass the object around. global_scoped_logger is thread safe because each object is thread specific. In order to be able to use global_scoped_logger you need to define the scope where the logging will operate: More...
struct  noop_deleter
class  pseudo_ostream
 A pseudo stream acts as an abstraction to a normal ostream. More...
class  scoped_logger
 handles verbose with log4cxx gracefully. scoped_logger takes care of collecting the log information within the scope, then spit it out (to whatever it was configured to) More...
class  scoped_timing
class  standard_console

Typedefs

typedef
moost::utils::singleton_default
< global
global_singleton
 Singleton instance of global.
typedef
boost::thread_specific_ptr
< scoped_logger
global_scoped_logger_t
typedef boost::shared_ptr
< scoped_logger
LoggerPtr

Functions

 constructor__ (init_global_singleton)
 Ensure logging is initialised and disabled.
LoggerPtr get_global_scoped_logger ()
 constructor__ (init_global_scoped_logger)
log4cxx::LevelPtr str2level (std::string const level)
void enable_thrift_logger (void(*function)(const char *)=&detail::warn_logger)

Variables

global_scoped_logger_t pgScopedLogging

Typedef Documentation

typedef boost::thread_specific_ptr<scoped_logger> moost::logging::global_scoped_logger_t

Definition at line 36 of file global_scoped_logger.h.

Singleton instance of global.

To enable logging:

global_singleton::instance().enable(...);

Definition at line 339 of file global.hpp.

Definition at line 37 of file global_scoped_logger.h.


Function Documentation

moost::logging::constructor__ ( init_global_scoped_logger  )

Definition at line 166 of file global_scoped_logger.h.

moost::logging::constructor__ ( init_global_singleton  )

Ensure logging is initialised and disabled.

Definition at line 345 of file global.hpp.

Here is the call graph for this function:

void moost::logging::enable_thrift_logger ( void(*)(const char *)  function = &detail::warn_logger) [inline]

Definition at line 52 of file thrift.hpp.

Free function to get the global scoped verbose for the current thread.

Note:
If possible please use MLOG_SCOPED_GLOBAL_GET_LOGGER(logger) instead

Definition at line 115 of file global_scoped_logger.h.

log4cxx::LevelPtr moost::logging::str2level ( std::string const  level) [inline]

Definition at line 854 of file logger.hpp.


Variable Documentation

The thread-specific logging object.

Definition at line 32 of file global_scoped_logger.cpp.