Realm
A distributed, event-based tasking library
Loading...
Searching...
No Matches
Realm::Logger Class Reference

#include <logging.h>

Classes

struct  LogStream

Public Types

enum  LoggingLevel {
  LEVEL_SPEW , LEVEL_DEBUG , LEVEL_INFO , LEVEL_PRINT ,
  LEVEL_WARNING , LEVEL_ERROR , LEVEL_FATAL , LEVEL_NONE
}

Public Member Functions

 Logger (const std::string &_name)
 ~Logger (void)
const std::string & get_name (void) const
LoggingLevel get_level (void) const
bool want_spew (void) const
bool want_debug (void) const
bool want_info (void) const
bool want_print (void) const
bool want_warning (void) const
bool want_error (void) const
bool want_fatal (void) const
LoggerMessage spew (void)
LoggerMessage debug (void)
LoggerMessage info (void)
LoggerMessage print (void)
LoggerMessage warning (void)
LoggerMessage error (void)
LoggerMessage fatal (void)
LoggerMessage newmsg (LoggingLevel level)
 REALM_ATTR_PRINTF_FORMAT (void spew(const char *fmt,...), 2, 3)
 REALM_ATTR_PRINTF_FORMAT (void debug(const char *fmt,...), 2, 3)
 REALM_ATTR_PRINTF_FORMAT (void info(const char *fmt,...), 2, 3)
 REALM_ATTR_PRINTF_FORMAT (void print(const char *fmt,...), 2, 3)
 REALM_ATTR_PRINTF_FORMAT (void warning(const char *fmt,...), 2, 3)
 REALM_ATTR_PRINTF_FORMAT (void error(const char *fmt,...), 2, 3)
 REALM_ATTR_PRINTF_FORMAT (void fatal(const char *fmt,...), 2, 3)

Static Public Member Functions

static void configure_from_cmdline (std::vector< std::string > &cmdline)
static void set_default_output (LoggerOutputStream *s)
static void set_logger_output (const std::string &name, LoggerOutputStream *s)

Protected Member Functions

REALM_INTERNAL_API_EXTERNAL_LINKAGE void log_msg (LoggingLevel level, const char *msgdata, size_t msglen)
REALM_INTERNAL_API void add_stream (LoggerOutputStream *s, LoggingLevel min_level, bool delete_when_done, bool flush_each_write)
REALM_INTERNAL_API void configure_done (void)

Protected Attributes

std::string name
std::vector< LogStream > streams
LoggingLevel log_level
bool configured
DelayedMessage * delayed_message_head
DelayedMessage ** delayed_message_tail

Friends

class LoggerMessage
class LoggerConfig

Member Enumeration Documentation

◆ LoggingLevel

Enumerator
LEVEL_SPEW 
LEVEL_DEBUG 
LEVEL_INFO 
LEVEL_PRINT 
LEVEL_WARNING 
LEVEL_ERROR 
LEVEL_FATAL 
LEVEL_NONE 

Constructor & Destructor Documentation

◆ Logger()

Realm::Logger::Logger ( const std::string & _name)

◆ ~Logger()

Realm::Logger::~Logger ( void )

Member Function Documentation

◆ add_stream()

REALM_INTERNAL_API void Realm::Logger::add_stream ( LoggerOutputStream * s,
LoggingLevel min_level,
bool delete_when_done,
bool flush_each_write )
protected

◆ configure_done()

REALM_INTERNAL_API void Realm::Logger::configure_done ( void )
protected

◆ configure_from_cmdline()

void Realm::Logger::configure_from_cmdline ( std::vector< std::string > & cmdline)
static

◆ debug()

LoggerMessage Realm::Logger::debug ( void )

◆ error()

LoggerMessage Realm::Logger::error ( void )

◆ fatal()

LoggerMessage Realm::Logger::fatal ( void )

◆ get_level()

LoggingLevel Realm::Logger::get_level ( void ) const

◆ get_name()

const std::string & Realm::Logger::get_name ( void ) const

◆ info()

LoggerMessage Realm::Logger::info ( void )

◆ log_msg()

REALM_INTERNAL_API_EXTERNAL_LINKAGE void Realm::Logger::log_msg ( LoggingLevel level,
const char * msgdata,
size_t msglen )
protected

◆ newmsg()

LoggerMessage Realm::Logger::newmsg ( LoggingLevel level)

◆ print()

LoggerMessage Realm::Logger::print ( void )

◆ REALM_ATTR_PRINTF_FORMAT() [1/7]

Realm::Logger::REALM_ATTR_PRINTF_FORMAT ( void debugconst char *fmt,...,
2 ,
3  )

◆ REALM_ATTR_PRINTF_FORMAT() [2/7]

Realm::Logger::REALM_ATTR_PRINTF_FORMAT ( void errorconst char *fmt,...,
2 ,
3  )

◆ REALM_ATTR_PRINTF_FORMAT() [3/7]

Realm::Logger::REALM_ATTR_PRINTF_FORMAT ( void fatalconst char *fmt,...,
2 ,
3  )

◆ REALM_ATTR_PRINTF_FORMAT() [4/7]

Realm::Logger::REALM_ATTR_PRINTF_FORMAT ( void infoconst char *fmt,...,
2 ,
3  )

◆ REALM_ATTR_PRINTF_FORMAT() [5/7]

Realm::Logger::REALM_ATTR_PRINTF_FORMAT ( void printconst char *fmt,...,
2 ,
3  )

◆ REALM_ATTR_PRINTF_FORMAT() [6/7]

Realm::Logger::REALM_ATTR_PRINTF_FORMAT ( void spewconst char *fmt,...,
2 ,
3  )

◆ REALM_ATTR_PRINTF_FORMAT() [7/7]

Realm::Logger::REALM_ATTR_PRINTF_FORMAT ( void warningconst char *fmt,...,
2 ,
3  )

◆ set_default_output()

void Realm::Logger::set_default_output ( LoggerOutputStream * s)
static

◆ set_logger_output()

void Realm::Logger::set_logger_output ( const std::string & name,
LoggerOutputStream * s )
static

◆ spew()

LoggerMessage Realm::Logger::spew ( void )

◆ want_debug()

bool Realm::Logger::want_debug ( void ) const

◆ want_error()

bool Realm::Logger::want_error ( void ) const

◆ want_fatal()

bool Realm::Logger::want_fatal ( void ) const

◆ want_info()

bool Realm::Logger::want_info ( void ) const

◆ want_print()

bool Realm::Logger::want_print ( void ) const

◆ want_spew()

bool Realm::Logger::want_spew ( void ) const

◆ want_warning()

bool Realm::Logger::want_warning ( void ) const

◆ warning()

LoggerMessage Realm::Logger::warning ( void )

◆ LoggerConfig

friend class LoggerConfig
friend

◆ LoggerMessage

friend class LoggerMessage
friend

Member Data Documentation

◆ configured

bool Realm::Logger::configured
protected

◆ delayed_message_head

DelayedMessage* Realm::Logger::delayed_message_head
protected

◆ delayed_message_tail

DelayedMessage** Realm::Logger::delayed_message_tail
protected

◆ log_level

LoggingLevel Realm::Logger::log_level
protected

◆ name

std::string Realm::Logger::name
protected

◆ streams

std::vector<LogStream> Realm::Logger::streams
protected

The documentation for this class was generated from the following file:
  • /home/runner/work/realm/realm/realm-src/src/realm/logging.h