salvus.flow.acta.observability.logs
salvus.flow.acta.observability.logs salvus flow acta observability logs Optional Acta logging with structured event fields.
Records include acta_run, acta_task, acta_key, acta_depth, and
acta_kind. Logging is silent until configure_logging is called.
Functions
configure_logging()
configure_logging()def configure_logging(verbosity: int = 0) -> None: ...Configure terminal logging at the requested verbosity.
Parameters
verbosityint —0for warnings only,1for one line per task event,2(or more) for keys and digests as well.
Returns None
log_event()
log_event()def log_event(event: Event, depth: int, logger_name: str) -> None: ...Emit one ledger event as a log record.
Parameters
eventEvent — The event, as stored.depthint — Its nesting depth, from the ledger’s parent edge.logger_namestr — The module logger to emit under, so a host can raise or silence one subsystem.
Returns None
Classes
TreeFormatter
TreeFormatterclass TreeFormatter(logging.Formatter):
def __init__(
self,
fmt: str | None = None,
datefmt: str | None = None,
style: Literal["%", "{", "$"] = "%",
validate: bool = True,
defaults: Mapping[str, Any] | None = None,
) -> None: ...Tree formatter.
Initialize the formatter accepted by configure_logging.
Parameters
fmtstr | None — The message format. This formatter renders only the message.datefmtstr | None — The date format used whenfmtincludes a timestamp.styleLiteral['%', '{', '$'] — The formatting style forfmt.validatebool — Whether to validatefmtagainststyle.defaultsMapping[str, Any] | None — Default values supplied to the format string.
Methods
format()
format()def format(self, record: logging.LogRecord) -> str: ...Render one record as an indented line.
Parameters
recordlogging.LogRecord — The record to render.
Returns str