mirror of
https://github.com/falcosecurity/falco.git
synced 2025-07-18 00:31:30 +00:00
chore(userspace/falco): move enabled sources list printout when capture is opened
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
This commit is contained in:
parent
21c2b1f472
commit
e85a8c914f
@ -330,6 +330,8 @@ application::run_result application::process_events()
|
|||||||
std::unique_ptr<std::thread> thread;
|
std::unique_ptr<std::thread> thread;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
print_enabled_event_sources();
|
||||||
|
|
||||||
// start event processing for all enabled sources
|
// start event processing for all enabled sources
|
||||||
std::vector<live_context> ctxs;
|
std::vector<live_context> ctxs;
|
||||||
ctxs.reserve(m_state->enabled_sources.size());
|
ctxs.reserve(m_state->enabled_sources.size());
|
||||||
|
@ -15,6 +15,18 @@ limitations under the License.
|
|||||||
|
|
||||||
using namespace falco::app;
|
using namespace falco::app;
|
||||||
|
|
||||||
|
void application::print_enabled_event_sources()
|
||||||
|
{
|
||||||
|
/* Print all enabled sources. */
|
||||||
|
std::string str;
|
||||||
|
for (const auto &s : m_state->enabled_sources)
|
||||||
|
{
|
||||||
|
str += str.empty() ? "" : ", ";
|
||||||
|
str += s;
|
||||||
|
}
|
||||||
|
falco_logger::log(LOG_INFO, "Enabled event sources: " + str + "\n");
|
||||||
|
}
|
||||||
|
|
||||||
application::run_result application::select_event_sources()
|
application::run_result application::select_event_sources()
|
||||||
{
|
{
|
||||||
m_state->enabled_sources = m_state->loaded_sources;
|
m_state->enabled_sources = m_state->loaded_sources;
|
||||||
@ -59,14 +71,5 @@ application::run_result application::select_event_sources()
|
|||||||
return run_result::fatal("Must enable at least one event source");
|
return run_result::fatal("Must enable at least one event source");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Print all enabled sources. */
|
|
||||||
std::string result;
|
|
||||||
for (const auto &s : m_state->enabled_sources)
|
|
||||||
{
|
|
||||||
result += result.empty() ? "" : ", ";
|
|
||||||
result += s;
|
|
||||||
}
|
|
||||||
falco_logger::log(LOG_INFO, "Enabled event sources: " + result + "\n");
|
|
||||||
|
|
||||||
return run_result::ok();
|
return run_result::ok();
|
||||||
}
|
}
|
@ -290,6 +290,7 @@ private:
|
|||||||
run_result open_offline_inspector();
|
run_result open_offline_inspector();
|
||||||
run_result open_live_inspector(std::shared_ptr<sinsp> inspector, const std::string& source);
|
run_result open_live_inspector(std::shared_ptr<sinsp> inspector, const std::string& source);
|
||||||
void add_source_to_engine(const std::string& src);
|
void add_source_to_engine(const std::string& src);
|
||||||
|
void print_enabled_event_sources();
|
||||||
void init_syscall_inspector(std::shared_ptr<sinsp> inspector, const falco::app::cmdline_options& opts);
|
void init_syscall_inspector(std::shared_ptr<sinsp> inspector, const falco::app::cmdline_options& opts);
|
||||||
run_result do_inspect(
|
run_result do_inspect(
|
||||||
std::shared_ptr<sinsp> inspector,
|
std::shared_ptr<sinsp> inspector,
|
||||||
|
Loading…
Reference in New Issue
Block a user