Skip to content

Commit

Permalink
Initialize mon_apps with log receiving and yaml reading.
Browse files Browse the repository at this point in the history
  • Loading branch information
Peguen committed Jan 13, 2025
1 parent 88f1c7c commit e13dd58
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
7 changes: 5 additions & 2 deletions app/mon/mon_cli/src/ecal_mon_cli.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ========================= eCAL LICENSE =================================
*
* Copyright (C) 2016 - 2024 Continental Corporation
* Copyright (C) 2016 - 2025 Continental Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -209,7 +209,10 @@ int main(int argc, char** argv)
}

// initialize eCAL API
eCAL::Initialize("eCALMon CLI", eCAL::Init::All);
auto config = eCAL::GetConfiguration();
config.InitFromConfig();
config.logging.receiver.enable = true;
eCAL::Initialize(config, "eCALMon CLI", eCAL::Init::All);

// set process state
eCAL::Process::SetState(proc_sev_healthy, proc_sev_level1, "Running");
Expand Down
1 change: 1 addition & 0 deletions app/mon/mon_gui/src/ecalmon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ Ecalmon::Ecalmon(QWidget *parent)
{
// Just make sure that eCAL is initialized
auto config = eCAL::GetConfiguration();
config.InitFromConfig();
config.logging.receiver.enable = true;
eCAL::Initialize(config, "eCALMon", eCAL::Init::Default | eCAL::Init::Monitoring);
eCAL::Monitoring::SetFilterState(false);
Expand Down
8 changes: 6 additions & 2 deletions app/mon/mon_tui/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ========================= eCAL LICENSE =================================
*
* Copyright (C) 2016 - 2019 Continental Corporation
* Copyright (C) 2016 - 2025 Continental Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,7 +32,11 @@ int main(int argc, char** argv)
{
auto args = ParseArgs(argc, argv);

auto status = eCAL::Initialize("eCALMon TUI", eCAL::Init::Default | eCAL::Init::Monitoring);
auto config = eCAL::GetConfiguration();
config.InitFromConfig();
config.logging.receiver.enable = true;

auto status = eCAL::Initialize(config, "eCALMon TUI", eCAL::Init::Default | eCAL::Init::Monitoring);
if (status == -1) std::cerr << "Failed to init" << std::endl;
eCAL::Process::SetState(proc_sev_healthy, proc_sev_level1, "Running");
eCAL::Monitoring::SetFilterState(false);
Expand Down

0 comments on commit e13dd58

Please sign in to comment.