tracing-slog

Crates.iotracing-slog
lib.rstracing-slog
version0.3.0
sourcesrc
created_at2021-11-14 21:50:52.565909
updated_at2024-04-24 02:37:28.026706
descriptionProvides compatibility between `tracing` and the `slog` crate. Use when a library uses `slog` but your application uses `tracing`.
homepage
repositoryhttps://github.com/ecliptical/tracing-slog
max_upload_size
id481874
size28,977
Peter Nehrer (pnehrer)

documentation

README

tracing-slog

Adapters for connecting structured log records from the slog crate into the tracing ecosystem.

Use when a library uses slog but your application uses tracing.

Heavily inspired by tracing-log.

Specifically, the emitted log entries include the custom fields slog.target, slog.module_path, slog.file, slog.line, and slog.column with corresponding values from the slog call site. A field slog.kv will contain a comma-separated list of the possible key value pairs supported in slog logging macros if the kv feature is enabled.

Note that the "native" filename and line_number metadata attributes will never be available (and target will always be slog). This is due to the fact that tracing requires static metadata constructed at the original call site. The tracing-log adapter does provide these due to explicit support in tracing.

Commit count: 16

cargo fmt