Module bones_framework::logging

source ·
Expand description

Logging module for bones. Provides implementation of global tracing subscriber and panic hook.

Enabled with feature “logging”. See docs of setup_logging for details + usage.

Re-exports§

Modules§

Structs§

  • Settings to enable writing tracing output to files.
  • Guard for file logging thread, this should be held onto for duration of app, if dropped writing to log file will stop.
  • Path to save log files. LogPath::find_app_data_dir may be used to to automatically find OS appropriate app data path from app namespace strings, e.g. (“org”, “fishfolk”, “jumpy”)
  • Plugin to enable tracing. Configures global tracing subscriber.

Enums§

Functions§

  • Setup the global tracing subscriber, add hook for tracing panics, and optionally enable logging to file system.
  • Helper to call setup_logging conciseably with reasonable defaults for logging to console and file system.
  • Panic hook that sends panic payload to [tracing::error], and backtrace if available.

Type Aliases§