rogue::Logging
Python binding
This C++ class is also exported into Python as rogue.Logging.
Python API page: - rogue.Logging
For conceptual usage, see:
-
class Logging
[header] 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.
Public Functions
-
explicit Logging(const std::string &name, bool quiet = false)
[header] [impl] Constructs a logger.
This constructor is a low-level C++ allocation path. Prefer
create()when shared ownership or Python exposure is required.- Parameters:
name – Logger name/category.
quiet – When
true, suppresses creation banner output.
Public Static Functions
-
static std::shared_ptr<rogue::Logging> create(const std::string &name, bool quiet = false)
[header] [impl] 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 returnsstd::shared_ptrownership compatible with Rogue pointer typedefs.- Parameters:
name – Logger name/category.
quiet – When
true, suppresses creation banner output.
- Returns:
Shared logger instance.
-
static void setLevel(uint32_t level)
[header] [impl] Sets the global default logging level.
- Parameters:
level – New global level threshold.
-
static void setFilter(const std::string &filter, uint32_t level)
[header] [impl] Sets name-based filter level override.
- Parameters:
filter – Logger-name prefix to match.
level – Level threshold for matching names.
-
static void setForwardPython(bool enable)
[header] [impl] Enables or disables forwarding Rogue C++ logs into Python logging.
- Parameters:
enable – When true, emitted C++ log messages are also sent to the Python
logginglogger with the same fully-qualified name.
-
static bool forwardPython()
[header] [impl] Returns whether Rogue C++ logs are currently forwarded to Python logging.
-
static void setEmitStdout(bool enable)
[header] [impl] Enables or disables direct stdout emission of Rogue C++ logs.
- Parameters:
enable – When false, Rogue C++ logs are not printed directly by the native logger sink.
-
static bool emitStdout()
[header] [impl] Returns whether Rogue C++ logs are currently emitted to stdout.
Public Static Attributes
-
explicit Logging(const std::string &name, bool quiet = false)