std::slog¶
Status: experimental
Structured, levelled logging.
API details and source¶
The implementation source contains the complete declarations and implementation notes. The table below lists canonical Gossamer call signatures; every item name links directly to its implementation file.
| Item | Canonical signature or declaration | Description |
|---|---|---|
Field |
type Field |
Key/value pair threaded through a logger. |
JsonHandler |
type JsonHandler |
JSON-lines handler. |
Logger |
type Logger |
Logger handle. |
TextHandler |
type TextHandler |
Line-oriented handler. |
debug |
fn debug(message: String) -> () |
Logs a JSON record at DEBUG level. |
error |
fn error(message: String) -> () |
Logs a JSON record at ERROR level. |
info |
fn info(message: String) -> () |
Logs a JSON record at INFO level. Trailing args are key/value pairs. |
warn |
fn warn(message: String) -> () |
Logs a JSON record at WARN level. |