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.

~Logging()
[header] [impl]

Destroys the logger instance.

void log(uint32_t level, const char *fmt, ...)
[header] [impl]

Emits a formatted log message at a specified level.

Parameters:
  • level – Severity level.

  • fmtprintf-style format string.

void critical(const char *fmt, ...)
[header] [impl]

Emits a formatted message at Critical level.

void error(const char *fmt, ...)
[header] [impl]

Emits a formatted message at Error level.

void warning(const char *fmt, ...)
[header] [impl]

Emits a formatted message at Warning level.

void info(const char *fmt, ...)
[header] [impl]

Emits a formatted message at Info level.

void debug(const char *fmt, ...)
[header] [impl]

Emits a formatted message at Debug level.

void logThreadId()
[header] [impl]

Emits the current thread id through this logger.

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 returns std::shared_ptr ownership 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 setup_python()
[header] [impl]

Registers Python bindings for Logging.

Public Static Attributes

static const uint32_t Critical = 50
[header]

Critical severity level constant.

Company : SLAC National Accelerator Laboratory

Description: interface for pyrogue

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 contained in the LICENSE.txt file.

static const uint32_t Error = 40
[header]

Error severity level constant.

static const uint32_t Thread = 35
[header]

Thread-trace severity level constant.

static const uint32_t Warning = 30
[header]

Warning severity level constant.

static const uint32_t Info = 20
[header]

Informational severity level constant.

static const uint32_t Debug = 10
[header]

Debug severity level constant.