Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
5c3c88d
Expose errors as failure::Error (#138)
gadunga Mar 11, 2020
905183e
Issue #129: Drop XML Config support (#137)
gadunga Mar 11, 2020
f59f4e5
Rename file feature (#147)
estk Mar 11, 2020
9c5b945
Update changelog
estk Mar 11, 2020
0f4085e
Add an init function which takes a RawConfig (#150)
gadunga Mar 30, 2020
6c75bc0
Clippy
estk Apr 4, 2020
9824445
Changelog, cleanup
estk Apr 4, 2020
461e4c6
json macro
estk Apr 4, 2020
fedf2df
qualify
estk Apr 4, 2020
f6dfdc3
typo
estk Apr 4, 2020
e6d5c6f
Remove unused dir from .gitignore
estk Apr 4, 2020
b190d48
Init raw on all platforms
estk Apr 4, 2020
1e8114f
Remove log4rs::FormatError::XmlFeatureFlagRequired (#156)
gadunga Apr 5, 2020
e9da948
Expand env vars in the path for File and RollingFile appenders (#155)
gadunga Apr 6, 2020
4b1b830
Reorganize config (#157)
estk Apr 24, 2020
5953720
Use anyhow/thiserror (#159)
estk Apr 24, 2020
a674389
Change addtivity to additive to match the actual code (#163)
gadunga Jul 20, 2020
b59a728
Errors 1.0 (#160)
estk Jul 22, 2020
ea3f2f3
clippy
estk Jul 22, 2020
dfec821
Standard derives rebase (#175)
estk Jul 22, 2020
9a02da9
Bump serde-value
estk Jul 22, 2020
3e09e60
Alpha 1 version
estk Jul 23, 2020
467b85d
Update highlight colors to be the same as env_logger (#167)
IceSentry Sep 28, 2020
c997e0e
Custom err handler (#183)
estk Sep 29, 2020
b25c9f0
bump ver
estk Sep 30, 2020
d6ddbb1
fix: init_raw_config forcing max_log_level to Info (#200)
1c7718e7 Dec 16, 2020
36627ba
pattern encoder: Set trace to default color, reset formatting after (…
judemille Dec 16, 2020
5459ec3
WIP: Adding ability to configure colors for console
noyez Dec 28, 2020
59846d5
Merge branch 'devel' into noyez_configurable_highlight_devel
noyez Dec 28, 2020
b58d7b0
fixing rustfmt errors
noyez Dec 29, 2020
1e2eec3
Merge branch 'noyez_configurable_highlight_devel' of https://github.c…
noyez Dec 29, 2020
10e9f2e
Edited `PatternEncoder::new_with_colormap()` function to merge user's
noyez Jan 14, 2021
576b960
mering from upstream
noyez Apr 8, 2021
4b63cf2
Merge branch 'master' of https://github.com/estk/log4rs into noyez_co…
noyez May 17, 2021
f28ca67
Adding test
noyez May 17, 2021
d0d37df
Merging with upstream v.1.1.1
noyez Apr 30, 2022
884087d
Fixing for LINT test w/
noyez Apr 30, 2022
225c5ee
Removing color_map as HashMap and adding ColorMap Struct.
noyez May 5, 2022
82bb5e5
Removing color_map as HashMap and adding ColorMap Struct.
noyez May 5, 2022
adb2564
Merge branch 'noyez_configurable_highlight_devel' of ssh://github.com…
noyez May 5, 2022
2a974ce
Merge branch 'noyez_configurable_highlight_devel' of ssh://github.com…
noyez May 5, 2022
a4f1cd0
Merge branch 'noyez_configurable_highlight_devel' of ssh://github.com…
noyez May 5, 2022
5bd8586
Removing default_color_map in favor of Default trait.
noyez May 5, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/config/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,9 @@ appenders:
path: /tmp/baz.log
encoder:
pattern: "%m"
color_map:
info: Blue
trace: Black

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if this is a test, another color than black should be used here I guess, in order not to assume any terminal color-mode. No matter what color is chosen other than white or black.


root:
appenders:
Expand Down
9 changes: 9 additions & 0 deletions src/encode/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ use std::collections::BTreeMap;

#[cfg(feature = "config_parsing")]
use crate::config::Deserializable;
#[cfg(feature = "file")]
use crate::file::Deserializable;

#[cfg(feature = "json_encoder")]
pub mod json;
Expand Down Expand Up @@ -77,6 +79,8 @@ impl<'de> de::Deserialize<'de> for EncoderConfig {
}

/// A text or background color.
#[cfg_attr(feature = "config_parsing", derive(serde::Deserialize))]
#[cfg_attr(feature = "config_parsing", derive(serde::Serialize))]
Comment thread
noyez marked this conversation as resolved.
#[allow(missing_docs)]
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
pub enum Color {
Expand All @@ -89,6 +93,11 @@ pub enum Color {
Cyan,
White,
}
impl Default for Color {
fn default() -> Self {
Color::Black

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be "None" to match either black or white depending on shell color mode ?

}
}

/// The style applied to text output.
///
Expand Down
Loading