Skip to content
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

fix: move a log after verbosity initialization #397

Merged
merged 1 commit into from
Jan 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions plugins/k8smeta/src/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ void my_plugin::parse_init_config(nlohmann::json& config_json)
// Verbosity, the default verbosity is already set in the 'init' method
if(config_json.contains(nlohmann::json::json_pointer(VERBOSITY_PATH)))
{
// If the user specified a verbosity we override the actual one (`warn`)
// If the user specified a verbosity we override the actual one (`info`)
std::string verbosity;
config_json.at(nlohmann::json::json_pointer(VERBOSITY_PATH))
.get_to(verbosity);
Expand Down Expand Up @@ -235,12 +235,6 @@ bool my_plugin::init(falcosecurity::init_input& in)
// We use local time like in Falco, not UTC
spdlog::set_pattern("%c: [%l] [k8smeta] %v");

SPDLOG_DEBUG("init the plugin");
// Remove this log when we reach `1.0.0`
SPDLOG_WARN("[EXPERIMENTAL] This plugin is in active development "
"and may undergo changes in behavior without prioritizing "
"backward compatibility.");

// This should never happen, the config is validated by the framework
if(in.get_config().empty())
{
Expand All @@ -252,6 +246,13 @@ bool my_plugin::init(falcosecurity::init_input& in)
auto cfg = nlohmann::json::parse(in.get_config());
parse_init_config(cfg);

SPDLOG_DEBUG("init the plugin");

// Remove this log when we reach `1.0.0`
SPDLOG_WARN("[EXPERIMENTAL] This plugin is in active development "
"and may undergo changes in behavior without prioritizing "
"backward compatibility.");

try
{
m_thread_table = t.get_table(THREAD_TABLE_NAME, st::SS_PLUGIN_ST_INT64);
Expand Down
Loading