Toolbox snapshot
The Reactive C++ Toolbox
Loading...
Searching...
No Matches
Classes | Namespaces | Typedefs | Enumerations | Functions
Logger.hpp File Reference
#include <boost/lockfree/queue.hpp>
#include <thread>
#include <toolbox/sys/Limits.hpp>
#include <toolbox/sys/Time.hpp>
#include <toolbox/util/Storage.hpp>
Include dependency graph for Logger.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  toolbox::sys::Logger
 
class  toolbox::sys::AsyncLogger
 
class  toolbox::sys::ScopedLogLevel
 
class  toolbox::sys::ScopedLogger
 

Namespaces

namespace  toolbox
 
namespace  toolbox::sys
 

Typedefs

using toolbox::sys::LogMsgPtr = StoragePtr< MaxLogLine >
 

Enumerations

enum class  toolbox::sys::LogLevel : int {
  toolbox::sys::None , toolbox::sys::Crit , toolbox::sys::Error , toolbox::sys::Warn ,
  toolbox::sys::Metric , toolbox::sys::Notice , toolbox::sys::Info , toolbox::sys::Debug
}
 

Functions

Loggertoolbox::sys::null_logger () noexcept
 Null logger. This logger does nothing and is effectively /dev/null.
 
Loggertoolbox::sys::std_logger () noexcept
 
Loggertoolbox::sys::sys_logger () noexcept
 System logger. This logger calls syslog().
 
const chartoolbox::sys::log_label (LogLevel level) noexcept
 Return log label for given log level.
 
LogLevel toolbox::sys::get_log_level () noexcept
 Return current log level.
 
bool toolbox::sys::is_log_level (LogLevel level) noexcept
 Return true if level is less than or equal to current log level.
 
LogLevel toolbox::sys::set_log_level (LogLevel level) noexcept
 Set log level globally for all threads.
 
Loggertoolbox::sys::get_logger () noexcept
 Return current logger.
 
Loggertoolbox::sys::set_logger (Logger &logger) noexcept
 Set logger globally for all threads.
 
Loggertoolbox::sys::set_logger (std::nullptr_t) noexcept
 
void toolbox::sys::write_log (WallTime ts, LogLevel level, LogMsgPtr &&msg, std::size_t size) noexcept
 
std::ostream & toolbox::sys::operator<< (std::ostream &os, LogLevel level)