-
-
Notifications
You must be signed in to change notification settings - Fork 167
Adding ability to configure colors for console #224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
noyez
wants to merge
43
commits into
estk:main
Choose a base branch
from
noyez:noyez_configurable_highlight_devel
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+236
−21
Open
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 905183e
Issue #129: Drop XML Config support (#137)
gadunga f59f4e5
Rename file feature (#147)
estk 9c5b945
Update changelog
estk 0f4085e
Add an init function which takes a RawConfig (#150)
gadunga 6c75bc0
Clippy
estk 9824445
Changelog, cleanup
estk 461e4c6
json macro
estk fedf2df
qualify
estk f6dfdc3
typo
estk e6d5c6f
Remove unused dir from .gitignore
estk b190d48
Init raw on all platforms
estk 1e8114f
Remove log4rs::FormatError::XmlFeatureFlagRequired (#156)
gadunga e9da948
Expand env vars in the path for File and RollingFile appenders (#155)
gadunga 4b1b830
Reorganize config (#157)
estk 5953720
Use anyhow/thiserror (#159)
estk a674389
Change addtivity to additive to match the actual code (#163)
gadunga b59a728
Errors 1.0 (#160)
estk ea3f2f3
clippy
estk dfec821
Standard derives rebase (#175)
estk 9a02da9
Bump serde-value
estk 3e09e60
Alpha 1 version
estk 467b85d
Update highlight colors to be the same as env_logger (#167)
IceSentry c997e0e
Custom err handler (#183)
estk b25c9f0
bump ver
estk d6ddbb1
fix: init_raw_config forcing max_log_level to Info (#200)
1c7718e7 36627ba
pattern encoder: Set trace to default color, reset formatting after (…
judemille 5459ec3
WIP: Adding ability to configure colors for console
noyez 59846d5
Merge branch 'devel' into noyez_configurable_highlight_devel
noyez b58d7b0
fixing rustfmt errors
noyez 1e2eec3
Merge branch 'noyez_configurable_highlight_devel' of https://github.c…
noyez 10e9f2e
Edited `PatternEncoder::new_with_colormap()` function to merge user's
noyez 576b960
mering from upstream
noyez 4b63cf2
Merge branch 'master' of https://github.com/estk/log4rs into noyez_co…
noyez f28ca67
Adding test
noyez d0d37df
Merging with upstream v.1.1.1
noyez 884087d
Fixing for LINT test w/
noyez 225c5ee
Removing color_map as HashMap and adding ColorMap Struct.
noyez 82bb5e5
Removing color_map as HashMap and adding ColorMap Struct.
noyez adb2564
Merge branch 'noyez_configurable_highlight_devel' of ssh://github.com…
noyez 2a974ce
Merge branch 'noyez_configurable_highlight_devel' of ssh://github.com…
noyez a4f1cd0
Merge branch 'noyez_configurable_highlight_devel' of ssh://github.com…
noyez 5bd8586
Removing default_color_map in favor of Default trait.
noyez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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; | ||
|
|
@@ -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))] | ||
|
noyez marked this conversation as resolved.
|
||
| #[allow(missing_docs)] | ||
| #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] | ||
| pub enum Color { | ||
|
|
@@ -89,6 +93,11 @@ pub enum Color { | |
| Cyan, | ||
| White, | ||
| } | ||
| impl Default for Color { | ||
| fn default() -> Self { | ||
| Color::Black | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. | ||
| /// | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.