|
40 | 40 | //! One `StatTrigger` attribute should be added to the log for each statistic it should update. |
41 | 41 | //! |
42 | 42 | //! - `StatName` (mandatory) - The name of the statistic to change, as defined on the |
43 | | -//! corresponding [`StatDefinition`](../slog_extlog/stats/struct.StatDefinition.html). |
| 43 | +//! corresponding [`StatDefinition`](../slog_extlog/stats/struct.StatDefinition.html). |
44 | 44 | //! - `Action` (mandatory) - one of: `Incr`, `Decr`, and `SetVal`, depending on whether this |
45 | | -//! change triggers an increment, decrement, or set to an explicit value. |
| 45 | +//! change triggers an increment, decrement, or set to an explicit value. |
46 | 46 | //! - `Condition` (optional) - A condition, based on the log fields, for this stat to be changed. |
47 | | -//! if not set, the stat is changed on every log. The value of this parameter is an |
48 | | -//! expression that returns a Boolean, and can use `self` for the current log object. |
| 47 | +//! if not set, the stat is changed on every log. The value of this parameter is an |
| 48 | +//! expression that returns a Boolean, and can use `self` for the current log object. |
49 | 49 | //! - `Value` or `ValueFrom` - The value to increment/decrement/set. One and only one |
50 | | -//! of these must be provided. `Value` for a fixed number, `ValueFrom` for an arbitrary |
51 | | -//! expression to find the value that may return self. |
| 50 | +//! of these must be provided. `Value` for a fixed number, `ValueFrom` for an arbitrary |
| 51 | +//! expression to find the value that may return self. |
52 | 52 | //! - `FixedGroups (optional)` - A comma-separated list of fixed tags to add to this statistic |
53 | | -//! for this trigger - see below. |
| 53 | +//! for this trigger - see below. |
54 | 54 | //! |
55 | 55 | //! ### Grouped (tagged) statistics) |
56 | 56 | //! Some statistics may be grouped with *tags*. Tags can be defined in two ways. |
@@ -515,12 +515,12 @@ fn impl_ext_loggable(ast: &syn::DeriveInput) -> proc_macro2::TokenStream { |
515 | 515 | // (which isn't the `to_str` or `to_short_str` name unfortunately). |
516 | 516 | let (level, text, id) = parse_log_details(log_details); |
517 | 517 | let level = match level { |
518 | | - slog::Level::Critical => "Critical", |
519 | | - slog::Level::Error => "Error", |
520 | | - slog::Level::Warning => "Warning", |
521 | | - slog::Level::Info => "Info", |
522 | | - slog::Level::Debug => "Debug", |
523 | | - slog::Level::Trace => "Trace", |
| 518 | + Level::Critical => "Critical", |
| 519 | + Level::Error => "Error", |
| 520 | + Level::Warning => "Warning", |
| 521 | + Level::Info => "Info", |
| 522 | + Level::Debug => "Debug", |
| 523 | + Level::Trace => "Trace", |
524 | 524 | }; |
525 | 525 | let level = syn::Ident::new(level, proc_macro2::Span::call_site()); |
526 | 526 |
|
|
0 commit comments