#slog #tracing #logging-tracing #structured-log #uses #records #adapter

no-std tracing-slog

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

2 unstable releases

0.2.0 Dec 1, 2022
0.1.0 Nov 14, 2021

#546 in Debugging

Download history 4041/week @ 2023-11-20 4734/week @ 2023-11-27 3982/week @ 2023-12-04 4467/week @ 2023-12-11 2727/week @ 2023-12-18 1063/week @ 2023-12-25 1797/week @ 2024-01-01 2674/week @ 2024-01-08 2804/week @ 2024-01-15 2805/week @ 2024-01-22 2966/week @ 2024-01-29 2949/week @ 2024-02-05 3912/week @ 2024-02-12 3815/week @ 2024-02-19 3201/week @ 2024-02-26 3871/week @ 2024-03-04

14,884 downloads per month

MIT license

11KB
193 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.

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.


lib.rs:

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.

Dependencies

~390KB