Metall  v0.29
A persistent memory allocator for data-centric analytics
metall::logger Class Reference

#include </home/runner/work/metall/metall/include/metall/logger.hpp>

Classes

struct  level_filter
 determines the minimum level of messages that should be loggged More...
 

Public Types

enum class  level {
  critical = metall_critical , error = metall_error , warning = metall_warning , info = metall_info ,
  debug = metall_debug , verbose = metall_verbose
}
 Log message level. More...
 

Public Member Functions

 logger ()=delete
 
 ~logger ()=delete
 
 logger (const logger &)=delete
 
 logger (logger &&)=delete
 
loggeroperator= (const logger &)=delete
 
loggeroperator= (logger &&)=delete
 

Static Public Member Functions

static void out (const level lvl, const char *const file_name, const int line_no, const char *const message) noexcept
 Log a message. More...
 
static void perror (const level lvl, const char *const file_name, const int line_no, const char *const message) noexcept
 Log a message about errno. More...
 
static level_filter log_level () noexcept
 
static void set_log_level (const level_filter lvl) noexcept
 Set the minimum logger level to show message. More...
 
static bool abort_on_critical_error () noexcept
 
static void abort_on_critical_error (const bool enable) noexcept
 If true is specified, enable an abort at a critical logger message. More...
 

Member Enumeration Documentation

◆ level

enum metall::logger::level
strong

Log message level.

Enumerator
critical 

Critical logger message — with default logger implementation abort the execution unless disabled.

error 

Error logger message.

warning 

Warning logger message.

info 

Info logger message.

debug 

Debug logger message.

verbose 

Verbose (lowest priority) logger message.

Constructor & Destructor Documentation

◆ logger() [1/3]

metall::logger::logger ( )
delete

◆ ~logger()

metall::logger::~logger ( )
delete

◆ logger() [2/3]

metall::logger::logger ( const logger )
delete

◆ logger() [3/3]

metall::logger::logger ( logger &&  )
delete

Member Function Documentation

◆ out()

static void metall::logger::out ( const level  lvl,
const char *const  file_name,
const int  line_no,
const char *const  message 
)
inlinestaticnoexcept

Log a message.

◆ perror()

static void metall::logger::perror ( const level  lvl,
const char *const  file_name,
const int  line_no,
const char *const  message 
)
inlinestaticnoexcept

Log a message about errno.

◆ operator=() [1/2]

logger& metall::logger::operator= ( const logger )
delete

◆ operator=() [2/2]

logger& metall::logger::operator= ( logger &&  )
delete

◆ log_level()

static level_filter metall::logger::log_level ( )
inlinestaticnoexcept
Returns
the current minimum logger level

◆ set_log_level()

static void metall::logger::set_log_level ( const level_filter  lvl)
inlinestaticnoexcept

Set the minimum logger level to show message.

Examples
logger.cpp.

◆ abort_on_critical_error() [1/2]

static bool metall::logger::abort_on_critical_error ( )
inlinestaticnoexcept
Returns
if the program should abort when a critical message is logged
Examples
logger.cpp.

◆ abort_on_critical_error() [2/2]

static void metall::logger::abort_on_critical_error ( const bool  enable)
inlinestaticnoexcept

If true is specified, enable an abort at a critical logger message.


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