-
Notifications
You must be signed in to change notification settings - Fork 29
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
Changes in ConfigurationParser module to parse yaml instead of toml #266
Changes in ConfigurationParser module to parse yaml instead of toml #266
Conversation
02b4e8a
to
add52fc
Compare
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.
LGTM
src/agent/configuration_parser/include/configuration_parser.hpp
Outdated
Show resolved
Hide resolved
src/agent/configuration_parser/tests/configuration_parser_test.cpp
Outdated
Show resolved
Hide resolved
src/agent/configuration_parser/tests/configuration_parser_test.cpp
Outdated
Show resolved
Hide resolved
@@ -37,13 +37,13 @@ void Logcollector::SetupFileReader(const configuration::ConfigurationParser& con | |||
long reloadInterval = config::DEFAULT_RELOAD_INTERVAL; | |||
|
|||
try { | |||
fileWait = m_enabled = configurationParser.GetConfig<long>("logcollector", "file_wait"); | |||
fileWait = configurationParser.GetConfig<long>("logcollector", "file_wait"); |
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.
Nice catch @Nicogp
I'm negatively surprised that this wasn't catch by any warning or static analysis. I played around in godbolt ( https://godbolt.org/z/jb8564oz5 ) and found that there's one warning we should have seen:
[warning: Although the value stored to 'enabled' is used in the enclosing expression, the value is never actually read from 'enabled' [clang-analyzer-deadcode.DeadStores]](javascript:;)
Something to look into later on...
…ion to use yaml instead of toml
5e8089b
to
c5dc02a
Compare
c5dc02a
to
104e0b4
Compare
Description
This PR adds changes to the ConfigurationParser module so that it now parses yaml files instead of toml files.
wazuh-agent.yml
Tests