|
rogue
|
Structured Rogue logging helper. More...
#include <Logging.h>
Public Member Functions | |
| Logging (const std::string &name, bool quiet=false) | |
| Constructs a logger. | |
| ~Logging () | |
| Destroys the logger instance. | |
| void | log (uint32_t level, const char *fmt,...) |
| Emits a formatted log message at a specified level. | |
| void | critical (const char *fmt,...) |
Emits a formatted message at Critical level. | |
| void | error (const char *fmt,...) |
Emits a formatted message at Error level. | |
| void | warning (const char *fmt,...) |
Emits a formatted message at Warning level. | |
| void | info (const char *fmt,...) |
Emits a formatted message at Info level. | |
| void | debug (const char *fmt,...) |
Emits a formatted message at Debug level. | |
| void | logThreadId () |
| Emits the current thread id through this logger. | |
Static Public Member Functions | |
| static std::shared_ptr< rogue::Logging > | create (const std::string &name, bool quiet=false) |
| Creates a logger instance. | |
| static void | setLevel (uint32_t level) |
| Sets the global default logging level. | |
| static void | setFilter (const std::string &filter, uint32_t level) |
| Sets name-based filter level override. | |
| static void | setup_python () |
Registers Python bindings for Logging. | |
Static Public Attributes | |
| static const uint32_t | Critical = 50 |
| Critical severity level constant. | |
| static const uint32_t | Error = 40 |
| Error severity level constant. | |
| static const uint32_t | Thread = 35 |
| Thread-trace severity level constant. | |
| static const uint32_t | Warning = 30 |
| Warning severity level constant. | |
| static const uint32_t | Info = 20 |
| Informational severity level constant. | |
| static const uint32_t | Debug = 10 |
| Debug severity level constant. | |
Structured Rogue logging helper.
Provides leveled logging with global level control and optional name-based filters. Instances are typically created per class/module and reused.
|
explicit |
Constructs a logger.
This constructor is a low-level C++ allocation path. Prefer create() when shared ownership or Python exposure is required.
| name | Logger name/category. |
| quiet | When true, suppresses creation banner output. |
Definition at line 65 of file Logging.cpp.
| rogue::Logging::~Logging | ( | ) |
Destroys the logger instance.
Definition at line 84 of file Logging.cpp.
|
static |
Creates a logger instance.
Parameter semantics are identical to the constructor; see Logging() for logger initialization details. This static factory is the preferred construction path when the object is shared across Rogue graph connections or exposed to Python. It returns std::shared_ptr ownership compatible with Rogue pointer typedefs.
| name | Logger name/category. |
| quiet | When true, suppresses creation banner output. |
Definition at line 60 of file Logging.cpp.
| void rogue::Logging::critical | ( | const char * | fmt, |
| ... | |||
| ) |
Emits a formatted message at Critical level.
Definition at line 123 of file Logging.cpp.
| void rogue::Logging::debug | ( | const char * | fmt, |
| ... | |||
| ) |
Emits a formatted message at Debug level.
Definition at line 151 of file Logging.cpp.
| void rogue::Logging::error | ( | const char * | fmt, |
| ... | |||
| ) |
Emits a formatted message at Error level.
Definition at line 130 of file Logging.cpp.
| void rogue::Logging::info | ( | const char * | fmt, |
| ... | |||
| ) |
Emits a formatted message at Info level.
Definition at line 144 of file Logging.cpp.
| void rogue::Logging::log | ( | uint32_t | level, |
| const char * | fmt, | ||
| ... | |||
| ) |
Emits a formatted log message at a specified level.
| level | Severity level. |
| fmt | printf-style format string. |
Definition at line 116 of file Logging.cpp.
| void rogue::Logging::logThreadId | ( | ) |
Emits the current thread id through this logger.
Definition at line 158 of file Logging.cpp.
|
static |
Sets name-based filter level override.
| filter | Logger-name prefix to match. |
| level | Level threshold for matching names. |
Definition at line 92 of file Logging.cpp.
|
static |
Sets the global default logging level.
| level | New global level threshold. |
Definition at line 86 of file Logging.cpp.
|
static |
Registers Python bindings for Logging.
Definition at line 174 of file Logging.cpp.
| void rogue::Logging::warning | ( | const char * | fmt, |
| ... | |||
| ) |
Emits a formatted message at Warning level.
Definition at line 137 of file Logging.cpp.
|
static |
Critical severity level constant.
Description:
This file is part of the rogue software platform. It is subject to the license terms in the LICENSE.txt file found in the top-level directory of this distribution and at: https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. No part of the rogue software platform, including this file, may be copied, modified, propagated, or distributed except according to the terms
|
static |
|
static |
|
static |
|
static |
|
static |