#slog #logging-tracing #tracing #logging

no-std tracing-slog

Provides compatibility between tracing and the slog crate. Use when a library uses slog but your application uses tracing

3 releases (breaking)

0.3.0 Apr 24, 2024
0.2.0 Dec 1, 2022
0.1.0 Nov 14, 2021

#266 in Debugging

Download history 4510/week @ 2024-07-19 4615/week @ 2024-07-26 4943/week @ 2024-08-02 4898/week @ 2024-08-09 4714/week @ 2024-08-16 5615/week @ 2024-08-23 4689/week @ 2024-08-30 4004/week @ 2024-09-06 3897/week @ 2024-09-13 3997/week @ 2024-09-20 4501/week @ 2024-09-27 4972/week @ 2024-10-04 5097/week @ 2024-10-11 4528/week @ 2024-10-18 5581/week @ 2024-10-25 5275/week @ 2024-11-01

21,662 downloads per month

MIT license

14KB
294 lines

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.

Dependencies

~385KB