Module json

Source
Expand description

§Sync JSON Writer Implementation

A Writer implementation that logs structured values synchronous in JSON format to a file, stderr, stdout, or any other destination. To create a Box<dyn Writer> use the new_writer function.

Example: https://github.com/iorust/structured-logger/blob/main/examples/simple.rs

Structs§

JSONWriter
A Writer implementation that writes logs in JSON format.

Functions§

new_writer
Creates a new Box<dyn Writer> instance with the JSONWriter for a given std::io::Write instance.