Triumvirate C++ API 0.5.0
Three-point clustering measurements in large-scale structure analyses.
Loading...
Searching...
No Matches
trv::sys::Logger Class Reference

Logger with logging level differentiation. More...

#include <monitor.hpp>

Public Member Functions

 Logger (LogLevel level)
 Construct the logger with the specified threshold level.
 
 Logger (int level)
 Construct the logger with the specified threshold level.
 
void reset_level (LogLevel level)
 Reset the logger threshold level.
 
void reset_level (int level)
 Reset the logger threshold level.
 
void log (LogLevel level_entry, const char *fmt_string,...)
 Log a message at the specified level.
 
void log (int level_entry, const char *fmt_string,...)
 Log a message at the specified level.
 
void debug (const char *fmt_string,...)
 Emit a debugging-level message.
 
void stat (const char *fmt_string,...)
 Emit a status-level message.
 
void info (const char *fmt_string,...)
 Emit a information-level message.
 
void warn (const char *fmt_string,...)
 Emit a warning-level message.
 
void error (const char *fmt_string,...)
 Emit a warning-level message.
 

Public Attributes

int level_limit
 logger threshold level
 

Detailed Description

Logger with logging level differentiation.

Definition at line 174 of file monitor.hpp.

Constructor & Destructor Documentation

◆ Logger() [1/2]

trv::sys::Logger::Logger ( LogLevel level)

Construct the logger with the specified threshold level.

Parameters
levelThreshold level (from enumerated options) (default is NSET).

Definition at line 148 of file monitor.cpp.

+ Here is the call graph for this function:

◆ Logger() [2/2]

trv::sys::Logger::Logger ( int level)

Construct the logger with the specified threshold level.

Parameters
levelThreshold level (as a non-negative integer) (default is 0).

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 152 of file monitor.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ reset_level() [1/2]

void trv::sys::Logger::reset_level ( LogLevel level)

Reset the logger threshold level.

Parameters
levelThreshold level (from enumerated options).

Definition at line 156 of file monitor.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reset_level() [2/2]

void trv::sys::Logger::reset_level ( int level)

Reset the logger threshold level.

Parameters
levelThreshold level (as a non-negative integer).

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 160 of file monitor.cpp.

+ Here is the call graph for this function:

◆ log() [1/2]

void trv::sys::Logger::log ( LogLevel level_entry,
const char * fmt_string,
... )

Log a message at the specified level.

If the specified level is below the threshold, no messages will be logged.

Parameters
level_entryMessage level (from enumerated options).
fmt_stringLog message format string.
...An arbitrary number of substitution arguments.

Definition at line 177 of file monitor.cpp.

+ Here is the call graph for this function:

◆ log() [2/2]

void trv::sys::Logger::log ( int level_entry,
const char * fmt_string,
... )

Log a message at the specified level.

If the specified level is below the threshold, no messages will be logged.

Parameters
level_entryMessage level (as a non-negative integer).
fmt_stringLog message format string.
...An arbitrary number of substitution arguments.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 210 of file monitor.cpp.

+ Here is the call graph for this function:

◆ debug()

void trv::sys::Logger::debug ( const char * fmt_string,
... )

Emit a debugging-level message.

If the threshold level is higher, no messages will be emitted.

Parameters
fmt_stringLog message format string.
...An arbitrary number of substitution arguments.

Definition at line 246 of file monitor.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stat()

void trv::sys::Logger::stat ( const char * fmt_string,
... )

Emit a status-level message.

If the threshold level is higher, no messages will be emitted.

Parameters
fmt_stringLog message format string.
...An arbitrary number of substitution arguments.

Definition at line 255 of file monitor.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ info()

void trv::sys::Logger::info ( const char * fmt_string,
... )

Emit a information-level message.

If the threshold level is higher, no messages will be emitted.

Parameters
fmt_stringLog message format string.
...An arbitrary number of substitution arguments.

Definition at line 264 of file monitor.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ warn()

void trv::sys::Logger::warn ( const char * fmt_string,
... )

Emit a warning-level message.

If the threshold level is higher, no messages will be emitted.

Parameters
fmt_stringLog message format string.
...An arbitrary number of substitution arguments.

Definition at line 273 of file monitor.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ error()

void trv::sys::Logger::error ( const char * fmt_string,
... )

Emit a warning-level message.

If the threshold level is higher, no messages will be emitted.

Parameters
fmt_stringLog message format string.
...An arbitrary number of substitution arguments.

Definition at line 282 of file monitor.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ level_limit

int trv::sys::Logger::level_limit

logger threshold level

Definition at line 176 of file monitor.hpp.


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