Skip to content

Commit aa10020

Browse files
committed
Update JsonFormatter doc examples "level" field to lowercase
1 parent 4bc900b commit aa10020

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

spdlog/src/formatter/json_formatter.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,22 +112,22 @@ impl From<JsonFormatterError> for crate::Error {
112112
/// - Default:
113113
///
114114
/// ```json
115-
/// {"level":"Info","timestamp":1722817424798,"payload":"hello, world!","tid":3472525}
116-
/// {"level":"Error","timestamp":1722817424798,"payload":"something went wrong","tid":3472525}
115+
/// {"level":"info","timestamp":1722817424798,"payload":"hello, world!","tid":3472525}
116+
/// {"level":"error","timestamp":1722817424798,"payload":"something went wrong","tid":3472525}
117117
/// ```
118118
///
119119
/// - If the logger has a name:
120120
///
121121
/// ```json
122-
/// {"level":"Info","timestamp":1722817541459,"payload":"hello, world!","logger":"app-component","tid":3478045}
123-
/// {"level":"Error","timestamp":1722817541459,"payload":"something went wrong","logger":"app-component","tid":3478045}
122+
/// {"level":"info","timestamp":1722817541459,"payload":"hello, world!","logger":"app-component","tid":3478045}
123+
/// {"level":"error","timestamp":1722817541459,"payload":"something went wrong","logger":"app-component","tid":3478045}
124124
/// ```
125125
///
126126
/// - If crate feature `source-location` is enabled:
127127
///
128128
/// ```json
129-
/// {"level":"Info","timestamp":1722817572709,"payload":"hello, world!","tid":3479856,"source":{"module_path":"my_app::say_hi","file":"src/say_hi.rs","line":4,"column":5}}
130-
/// {"level":"Error","timestamp":1722817572709,"payload":"something went wrong","tid":3479856,"source":{"module_path":"my_app::say_hi","file":"src/say_hi.rs","line":5,"column":5}}
129+
/// {"level":"info","timestamp":1722817572709,"payload":"hello, world!","tid":3479856,"source":{"module_path":"my_app::say_hi","file":"src/say_hi.rs","line":4,"column":5}}
130+
/// {"level":"error","timestamp":1722817572709,"payload":"something went wrong","tid":3479856,"source":{"module_path":"my_app::say_hi","file":"src/say_hi.rs","line":5,"column":5}}
131131
/// ```
132132
///
133133
/// [`Level::as_str`]: crate::Level::as_str

0 commit comments

Comments
 (0)