mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-02 07:05:54 +00:00
update(userspace/falco): make log level a configuration member
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
This commit is contained in:
committed by
poiana
parent
d808c0aeaf
commit
ade64b0ce8
@@ -16,7 +16,7 @@ set(SYSDIG_CMAKE_WORKING_DIR "${CMAKE_BINARY_DIR}/sysdig-repo")
|
|||||||
|
|
||||||
# this needs to be here at the top
|
# this needs to be here at the top
|
||||||
if(USE_BUNDLED_DEPS)
|
if(USE_BUNDLED_DEPS)
|
||||||
# explicitly force this dependency to use the system OpenSSL
|
# explicitly force this dependency to use the bundled OpenSSL
|
||||||
set(USE_BUNDLED_OPENSSL ON)
|
set(USE_BUNDLED_OPENSSL ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@@ -170,9 +170,9 @@ void falco_configuration::init(string conf_filename, list<string> &cmdline_optio
|
|||||||
throw logic_error("Error reading config file (" + m_config_file + "): No outputs configured. Please configure at least one output file output enabled but no filename in configuration block");
|
throw logic_error("Error reading config file (" + m_config_file + "): No outputs configured. Please configure at least one output file output enabled but no filename in configuration block");
|
||||||
}
|
}
|
||||||
|
|
||||||
string log_level = m_config->get_scalar<string>("log_level", "info");
|
m_log_level = m_config->get_scalar<string>("log_level", "info");
|
||||||
|
|
||||||
falco_logger::set_level(log_level);
|
falco_logger::set_level(m_log_level);
|
||||||
|
|
||||||
m_notifications_rate = m_config->get_scalar<uint32_t>("outputs", "rate", 1);
|
m_notifications_rate = m_config->get_scalar<uint32_t>("outputs", "rate", 1);
|
||||||
m_notifications_max_burst = m_config->get_scalar<uint32_t>("outputs", "max_burst", 1000);
|
m_notifications_max_burst = m_config->get_scalar<uint32_t>("outputs", "max_burst", 1000);
|
||||||
|
@@ -195,6 +195,7 @@ public:
|
|||||||
std::list<std::string> m_rules_filenames;
|
std::list<std::string> m_rules_filenames;
|
||||||
bool m_json_output;
|
bool m_json_output;
|
||||||
bool m_json_include_output_property;
|
bool m_json_include_output_property;
|
||||||
|
std::string m_log_level;
|
||||||
std::vector<falco_outputs::output_config> m_outputs;
|
std::vector<falco_outputs::output_config> m_outputs;
|
||||||
uint32_t m_notifications_rate;
|
uint32_t m_notifications_rate;
|
||||||
uint32_t m_notifications_max_burst;
|
uint32_t m_notifications_max_burst;
|
||||||
|
Reference in New Issue
Block a user