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
Add support for environment variables resolution in log file names #570
base: develop
Are you sure you want to change the base?
Conversation
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.
This will cause us to lose support for GCC 4.6.4 as regex was implemented in 4.9+ -
see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53631 => Target Milestone section
Can we please do it without depending on regex as it's not worth losing support for two minor versions of GCC just to add little support for environment variables.
Sure, you are right! |
@@ -93,7 +93,7 @@ | |||
#else | |||
# define ELPP_OS_MAC 0 | |||
#endif | |||
#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) |
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.
why remove this?
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.
I think this is some typo, definitely unintended.
can you please add test cases as well please? Preferably in TypedConfigurationsTest |
Sure, I will! I just was out of time recently, sorry for not answering :3 |
This is a
I have
CHANGELOG.md
README.md
The syntax is cmake-like:
E.g., suppose we have ELPP_VAR as environment variable, then configuration file can look like this:
Global:
FORMAT = "%msg"
FILENAME = "matcher_${ELPP_VAR}.log"
ENABLED = true
TO_FILE = true
TO_STANDARD_OUTPUT = true
SUBSECOND_PRECISION = 6
PERFORMANCE_TRACKING = true
MAX_LOG_FILE_SIZE = 2097152 ## 2MB - Comment starts with two hashes (##)
LOG_FLUSH_THRESHOLD = 100 ## Flush after every 100 logs
In case ELPP_VAR is not set, it will be substituted with an empty string.