17#ifndef __ROGUE_LOGGING_H__
18#define __ROGUE_LOGGING_H__
60 static uint32_t gblLevel_;
63 static std::mutex levelMtx_;
66 static std::vector<rogue::LogFilter*> filters_;
68 void intLog(uint32_t level,
const char* format, va_list args);
80 static const uint32_t
Error = 40;
86 static const uint32_t
Info = 20;
88 static const uint32_t
Debug = 10;
104 static std::shared_ptr<rogue::Logging>
create(
const std::string& name,
bool quiet =
false);
116 explicit Logging(
const std::string& name,
bool quiet =
false);
124 static void setLevel(uint32_t level);
131 static void setFilter(
const std::string& filter, uint32_t level);
138 void log(uint32_t level,
const char* fmt, ...);
141 void critical(
const char* fmt, ...);
143 void error(
const char* fmt, ...);
145 void warning(
const char* fmt, ...);
147 void info(
const char* fmt, ...);
149 void debug(
const char* fmt, ...);
Per-logger level override filter entry.
LogFilter(std::string name, uint32_t level)
Constructs a filter entry.
uint32_t level_
Minimum enabled level for matching names.
std::string name_
Logger name prefix to match.
Structured Rogue logging helper.
~Logging()
Destroys the logger instance.
void info(const char *fmt,...)
Emits a formatted message at Info level.
static const uint32_t Thread
Thread-trace severity level constant.
void logThreadId()
Emits the current thread id through this logger.
static void setup_python()
Registers Python bindings for Logging.
static std::shared_ptr< rogue::Logging > create(const std::string &name, bool quiet=false)
Creates a logger instance.
static void setFilter(const std::string &filter, uint32_t level)
Sets name-based filter level override.
void warning(const char *fmt,...)
Emits a formatted message at Warning level.
static const uint32_t Debug
Debug severity level constant.
void log(uint32_t level, const char *fmt,...)
Emits a formatted log message at a specified level.
static const uint32_t Error
Error severity level constant.
static const uint32_t Info
Informational severity level constant.
static const uint32_t Warning
Warning severity level constant.
static void setLevel(uint32_t level)
Sets the global default logging level.
void critical(const char *fmt,...)
Emits a formatted message at Critical level.
void debug(const char *fmt,...)
Emits a formatted message at Debug level.
static const uint32_t Critical
Critical severity level constant.
void error(const char *fmt,...)
Emits a formatted message at Error level.
std::shared_ptr< rogue::Logging > LoggingPtr
Shared pointer alias for Logging.