Skip to content

Commit

Permalink
fix: adopt new libsinsp logger
Browse files Browse the repository at this point in the history
Signed-off-by: Roberto Scolaro <[email protected]>
  • Loading branch information
therealbobo committed Jan 18, 2024
1 parent a25b5c1 commit 9b8141e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions userspace/falco/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ void falco_logger::set_sinsp_logging(bool enable, const std::string& severity, c
if (enable)
{
s_sinsp_logger_prefix = prefix;
g_logger.set_severity(decode_sinsp_severity(severity));
g_logger.disable_timestamps();
g_logger.add_callback_log(
libsinsp_logger()->set_severity(decode_sinsp_severity(severity));
libsinsp_logger()->disable_timestamps();
libsinsp_logger()->add_callback_log(
[](std::string&& str, const sinsp_logger::severity sev)
{
// note: using falco_logger::level ensures that the sinsp
Expand All @@ -126,7 +126,7 @@ void falco_logger::set_sinsp_logging(bool enable, const std::string& severity, c
}
else
{
g_logger.remove_callback_log();
libsinsp_logger()->remove_callback_log();
}
}

Expand Down

0 comments on commit 9b8141e

Please sign in to comment.