Aurore
A Switch-like interface for your app, on every screen
Loading...
Searching...
No Matches
aurore::Logger Class Reference

#include <aurore/core/logger.hpp>

Public Types

using TimePoint = std::chrono::system_clock::time_point
 

Static Public Member Functions

static void setLogLevel (LogLevel logLevel)
 
static LogLevel getLogLevel ()
 
static void setLogOutput (std::FILE *logOut)
 
static void setThreadSafeLogging (bool threadSafeLogging)
 
template<typename... Args>
static void log (LogLevel level, std::string prefix, std::string color, fmt::format_string< Args... > format, Args &&... args)
 
template<typename... Args>
static void error (fmt::format_string< Args... > format, Args &&... args)
 
template<typename... Args>
static void warning (fmt::format_string< Args... > format, Args &&... args)
 
template<typename... Args>
static void info (fmt::format_string< Args... > format, Args &&... args)
 
template<typename... Args>
static void debug (fmt::format_string< Args... > format, Args &&... args)
 
template<typename... Args>
static void verbose (fmt::format_string< Args... > format, Args &&... args)
 
static Event< TimePoint, LogLevel, std::string > * getLogEvent ()
 

Member Typedef Documentation

◆ TimePoint

using aurore::Logger::TimePoint = std::chrono::system_clock::time_point

Member Function Documentation

◆ debug()

template<typename... Args>
static void aurore::Logger::debug ( fmt::format_string< Args... >  format,
Args &&...  args 
)
inlinestatic

◆ error()

template<typename... Args>
static void aurore::Logger::error ( fmt::format_string< Args... >  format,
Args &&...  args 
)
inlinestatic

◆ getLogEvent()

static Event< TimePoint, LogLevel, std::string > * aurore::Logger::getLogEvent ( )
inlinestatic

◆ getLogLevel()

static LogLevel aurore::Logger::getLogLevel ( )
static

◆ info()

template<typename... Args>
static void aurore::Logger::info ( fmt::format_string< Args... >  format,
Args &&...  args 
)
inlinestatic

◆ log()

template<typename... Args>
static void aurore::Logger::log ( LogLevel  level,
std::string  prefix,
std::string  color,
fmt::format_string< Args... >  format,
Args &&...  args 
)
inlinestatic

◆ setLogLevel()

static void aurore::Logger::setLogLevel ( LogLevel  logLevel)
static

◆ setLogOutput()

static void aurore::Logger::setLogOutput ( std::FILE *  logOut)
static

◆ setThreadSafeLogging()

static void aurore::Logger::setThreadSafeLogging ( bool  threadSafeLogging)
static

If sets to true, each log operation will lock a mutex, making the Logger thread-safe.

◆ verbose()

template<typename... Args>
static void aurore::Logger::verbose ( fmt::format_string< Args... >  format,
Args &&...  args 
)
inlinestatic

◆ warning()

template<typename... Args>
static void aurore::Logger::warning ( fmt::format_string< Args... >  format,
Args &&...  args 
)
inlinestatic

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