Skip to content

Namespace star::logger

Namespace List > star > logger

Public Types

Type Name
enum LogLevel

Public Static Attributes

Type Name
const char * LOG_LEVEL_STRINGS = {"TRACE", "DEBUG", "INFO", "WARN", "ERROR"}
LogLevel current_log_level = STARDS\_ERROR

Public Functions

Type Name
LogLevel get_log_level ()
Gets the current log level.
void log_impl (std::ostream & os, const T & first)
Base implementation for logging a single value.
void log_impl (std::ostream & os, const T & first, const Args &... args)
Recursive implementation for logging multiple values.
void log_internal (LogLevel level, int line, const char * func, const Args &... args)
Internal logging function that formats and outputs log messages.
void set_log_level (LogLevel level)
Sets the current log level.

Public Types Documentation

enum LogLevel

enum star::logger::LogLevel {
    STARDS_TRACE =0,
    STARDS_DEBUG,
    STARDS_INFO,
    STARDS_WARN,
    STARDS_ERROR
};

Public Static Attributes Documentation

variable LOG_LEVEL_STRINGS

const char* star::logger::LOG_LEVEL_STRINGS[];

variable current_log_level

LogLevel star::logger::current_log_level;

Public Functions Documentation

function get_log_level

Gets the current log level.

inline LogLevel star::logger::get_log_level () 

Returns:

Current log level


function log_impl

Base implementation for logging a single value.

template<typename T>
void star::logger::log_impl (
    std::ostream & os,
    const T & first
) 

Parameters:

  • os Output stream to write to
  • first Value to log

function log_impl

Recursive implementation for logging multiple values.

template<typename T, typename... Args>
void star::logger::log_impl (
    std::ostream & os,
    const T & first,
    const Args &... args
) 

Parameters:

  • os Output stream to write to
  • first First value to log
  • args Remaining values to log

function log_internal

Internal logging function that formats and outputs log messages.

template<typename... Args>
void star::logger::log_internal (
    LogLevel level,
    int line,
    const char * func,
    const Args &... args
) 

Parameters:

  • level Log level of the message
  • line Source code line number
  • func Function name
  • args Values to log

function set_log_level

Sets the current log level.

inline void star::logger::set_log_level (
    LogLevel level
) 

Parameters:

  • level New log level to use


The documentation for this class was generated from the following file StarDS/include/stards.h