RADLib
RADical C++ application framework
RADLogging Namespace Reference

Classes

class  Sink
 Logger sink interface. More...
 
class  Logger
 Async process-wide logger. More...
 
class  LogStream
 Streaming log record; emits on destruction. More...
 

Enumerations

enum class  Level {
  Trace = 0 , Debug , Info , Warning ,
  Error , Critical , Off
}
 Log severity. More...
 

Functions

std::shared_ptr< SinkconsoleSink (bool stderrForWarnings=true)
 Creates a console sink. More...
 
std::shared_ptr< SinkfileSink (const std::string &path)
 Creates a file sink. More...
 
std::shared_ptr< SinkrotatingFileSink (const std::string &path, size_t maxBytes, size_t maxFiles=3)
 Creates a rotating file sink. More...
 
std::shared_ptr< SinksyslogSink (std::string ident="RADLib")
 Creates a syslog sink. More...
 
std::string levelName (Level level)
 Formats a level as text. More...
 

Enumeration Type Documentation

◆ Level

enum RADLogging::Level
strong

Log severity.

Enumerator
Trace 
Debug 
Info 
Warning 
Error 
Critical 
Off 

Function Documentation

◆ consoleSink()

std::shared_ptr<Sink> RADLogging::consoleSink ( bool  stderrForWarnings = true)

Creates a console sink.

◆ fileSink()

std::shared_ptr<Sink> RADLogging::fileSink ( const std::string &  path)

Creates a file sink.

◆ levelName()

std::string RADLogging::levelName ( Level  level)

Formats a level as text.

◆ rotatingFileSink()

std::shared_ptr<Sink> RADLogging::rotatingFileSink ( const std::string &  path,
size_t  maxBytes,
size_t  maxFiles = 3 
)

Creates a rotating file sink.

◆ syslogSink()

std::shared_ptr<Sink> RADLogging::syslogSink ( std::string  ident = "RADLib")

Creates a syslog sink.