Skip to content

Commit

Permalink
chore(logger): move docs to the struct definition
Browse files Browse the repository at this point in the history
  • Loading branch information
nerodono committed Jun 13, 2024
1 parent 0719951 commit ccb7672
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 6 additions & 0 deletions elfo-logger/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ pub struct Config {
#[serde(default)]
pub format: Format,

/// Size limit for each written log-line, in bytes.
/// If size exceeds the limit, it will be truncated in the following order:
///
/// 1. Message with custom fields
/// 2. Meta-info (level, timestamp, ...)
/// 3. Meta-fields (location, module)
#[serde(default = "default_max_line_size")]
pub max_line_size: ByteSize,

Expand Down
2 changes: 0 additions & 2 deletions examples/examples/usage/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
#path = "example.log"
#format.with_location = false
#format.with_module = false
## Max size of each line, in bytes, when actual line size exceedes, its contents will be
## truncated in the following order: message with custom fields, meta-info (level, timestamp, ...), meta-fields (location, module)
#max_line_size = "1KiB"
#
# It's possible to set `max_level` for a specific target:
Expand Down

0 comments on commit ccb7672

Please sign in to comment.