JayBeams  0.1
Another project to have fun coding.
Public Member Functions | Public Attributes | List of all members
jb::log::config Class Reference

Configuration object for the logging functions. More...

#include <log.hpp>

Inheritance diagram for jb::log::config:
jb::config_object

Public Member Functions

 config ()
 
 config_object_constructors (config)
 
void validate () const override
 Validate the settings. More...
 
- Public Member Functions inherited from jb::config_object
 config_object ()
 Default constructor. More...
 
 config_object (config_object const &rhs)
 Copy constructor. More...
 
 config_object (config_object &&rhs)
 Move constructor. More...
 
virtual ~config_object ()
 Destructor. More...
 
config_objectoperator= (config_object rhs)
 Copy & swap assignment. More...
 
void swap (config_object &rhs)
 Derived classes should implement member by member swap. More...
 
void load_overrides (int &argc, char *argv[], std::string const &filename, char const *environment_variable_name)
 Read the configuration file and load the overrides defined therein. More...
 
void load_overrides (int &argc, char *argv[], std::string const &filename)
 Read the configuration file and load the overrides defined therein. More...
 
void load_overrides (int &argc, char *argv[], std::istream &is)
 Read the configuration file and load the overrides defined therein. More...
 
void process_cmdline (int &argc, char *argv[])
 Process the command line. More...
 
std::ostream & to_stream (std::ostream &os) const
 Print out the settings. More...
 

Public Attributes

jb::config_attribute< config, jb::severity_levelminimum_severity
 
jb::config_attribute< config, jb::severity_levelminimum_console_severity
 
jb::config_attribute< config, bool > enable_console_logging
 
jb::config_attribute< config, bool > enable_file_logging
 
jb::config_attribute< config, std::string > logfile_basename
 
jb::config_attribute< config, std::string > logfile_suffix
 
jb::config_attribute< config, std::string > logfile_archive_directory
 
jb::config_attribute< config, long > maximum_size_archived
 
jb::config_attribute< config, long > minimum_free_space
 

Additional Inherited Members

- Static Protected Member Functions inherited from jb::config_object
static attribute_descriptor desc (std::string const &name)
 Convenience function to create attribute descriptors with less typing. More...
 
static attribute_descriptor desc (std::string const &name, std::string const &class_name)
 Convenience function to create attribute descriptors with less typing. More...
 

Detailed Description

Configuration object for the logging functions.

Definition at line 29 of file log.hpp.

Constructor & Destructor Documentation

◆ config()

jb::log::config::config ( )

Definition at line 65 of file log.cpp.

Member Function Documentation

◆ config_object_constructors()

jb::log::config::config_object_constructors ( config  )

◆ validate()

void jb::log::config::validate ( ) const
overridevirtual

Validate the settings.

Exceptions
jb::usageif a problem is detected.

Reimplemented from jb::config_object.

Definition at line 115 of file log.cpp.

References jb::log::BOOST_LOG_ATTRIBUTE_KEYWORD(), enable_file_logging, and logfile_basename.

Member Data Documentation

◆ enable_console_logging

jb::config_attribute<config, bool> jb::log::config::enable_console_logging

Definition at line 36 of file log.hpp.

Referenced by jb::log::init().

◆ enable_file_logging

jb::config_attribute<config, bool> jb::log::config::enable_file_logging

Definition at line 37 of file log.hpp.

Referenced by jb::log::init(), and validate().

◆ logfile_archive_directory

jb::config_attribute<config, std::string> jb::log::config::logfile_archive_directory

Definition at line 40 of file log.hpp.

Referenced by jb::log::init().

◆ logfile_basename

jb::config_attribute<config, std::string> jb::log::config::logfile_basename

Definition at line 38 of file log.hpp.

Referenced by jb::log::init(), and validate().

◆ logfile_suffix

jb::config_attribute<config, std::string> jb::log::config::logfile_suffix

Definition at line 39 of file log.hpp.

Referenced by jb::log::init().

◆ maximum_size_archived

jb::config_attribute<config, long> jb::log::config::maximum_size_archived

Definition at line 41 of file log.hpp.

Referenced by jb::log::init().

◆ minimum_console_severity

jb::config_attribute<config, jb::severity_level> jb::log::config::minimum_console_severity

Definition at line 35 of file log.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), and jb::log::init().

◆ minimum_free_space

jb::config_attribute<config, long> jb::log::config::minimum_free_space

Definition at line 42 of file log.hpp.

Referenced by jb::log::init().

◆ minimum_severity

jb::config_attribute<config, jb::severity_level> jb::log::config::minimum_severity

Definition at line 34 of file log.hpp.

Referenced by BOOST_AUTO_TEST_CASE(), and jb::log::init().


The documentation for this class was generated from the following files: