snaplogger: snaplogger::logger Class Reference

snaplogger  1.0.0
Easy to use logger in C++.
Inheritance diagram for snaplogger::logger:
Public Types typedef std::shared_ptr< loggerpointer_t   typedef std::weak_ptr< loggerweak_pointer_t   Public Member Functions void add_appender (appender::pointer_t a)   void add_component_to_ignore (component::pointer_t comp)   void add_component_to_include (component::pointer_t comp)   void add_config (std::string const &config_filename)   appender::pointer_t add_console_appender ()   appender::pointer_t add_file_appender (std::string const &filename)   appender::pointer_t add_syslog_appender (std::string const &identity)   severity_t get_lowest_severity () const   bool has_appender (std::string const &type) const   bool is_asynchronous () const   bool is_configured () const   void log_message (message const &msg)   void process_message (message const &msg)   void reduce_severity (severity_t severity_level)   void reopen ()   void reset ()  Reset the logger to its startup state. More...
  void set_asynchronous (bool status)   void set_config (advgetopt::getopt const &params)   void set_severity (severity_t severity_level)   void severity_changed (severity_t severity_level)   virtual void shutdown ()   Static Public Member Functions static logger::pointer_t get_instance ()   Protected Attributes component::pointer_t f_normal_component = component::pointer_t()   Private Member Functions  logger (logger const &rhs)=delete   loggeroperator= (logger const &rhs)=delete   Private Attributes appender::vector_t f_appenders = appender::vector_t()   bool f_asynchronous = false   component::set_t f_components_to_ignore = component::set_t()   component::set_t f_components_to_include = component::set_t()   severity_t f_lowest_severity = severity_t::SEVERITY_OFF   Detailed Description

Definition at line 45 of file logger.h.

Member Function Documentation
void snaplogger::logger::reset ( )

This function resets the logger to non-asynchronous and no appenders.

This is mainly used in our unit tests so we do not have to run the tests one at a time. It should nearly never be useful in your environment except if you do a fork() and wanted the child to have its own special log environment.

Definition at line 131 of file logger.cpp.


The documentation for this class was generated from the following files:
  • /home/snapwebsites/snapcpp/contrib/snaplogger/snaplogger/logger.h
  • /home/snapwebsites/snapcpp/contrib/snaplogger/snaplogger/logger.cpp

This document is part of the Snap! Websites Project.

Copyright by Made to Order Software Corp.

Syndicate content

Snap! Websites
An Open Source CMS System in C++

Contact Us Directly