Skip to content

Commit

Permalink
refactor(userspace/falco): make sinsp logging part of the configurati…
Browse files Browse the repository at this point in the history
…on (default to false)

Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
  • Loading branch information
jasondellaluce committed Jun 23, 2022
1 parent e188b78 commit 51607ff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions falco.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ log_syslog: true
# "alert", "critical", "error", "warning", "notice", "info", "debug".
log_level: info

# Whether or not logging from libsinsp is enabled. If true, logs
# coming from libsinsp are managed by Falco and comply to the configured
# values of log_level, log_stderr, and log_syslog. Defaults to false.
log_sinsp: false

# Minimum rule priority level to load and run. All rules having a
# priority more severe than this level will be loaded/run. Can be one
# of "emergency", "alert", "critical", "error", "warning", "notice",
Expand Down
2 changes: 2 additions & 0 deletions userspace/falco/configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ void falco_configuration::init(string conf_filename, const vector<string> &cmdli

falco_logger::set_level(m_log_level);

falco_logger::set_sinsp_logging(m_config->get_scalar<bool>("log_sinsp", false));

m_output_timeout = m_config->get_scalar<uint32_t>("output_timeout", 2000);

m_notifications_rate = m_config->get_scalar<uint32_t>("outputs.rate", 1);
Expand Down

0 comments on commit 51607ff

Please sign in to comment.