-
Notifications
You must be signed in to change notification settings - Fork 180
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
[Logging] Introducing Provider/Receiver pattern for logging #1831
Changes from 20 commits
dbb5478
9cbaf5a
bddd31f
360deb9
28d7734
2c2956c
24a0b13
50f88ca
294e531
a5bf465
c390e4c
d22b9a9
960e9ba
546db2c
4072334
ee26111
bcf6d54
c4f4cd7
e0729f6
2d6cee1
2b4d197
2c53961
9ceee76
76707d5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,7 +71,7 @@ Ecalmon::Ecalmon(QWidget *parent) | |
, monitor_error_counter_(0) | ||
{ | ||
// Just make sure that eCAL is initialized | ||
eCAL::Initialize(0, nullptr, "eCALMon", eCAL::Init::Default | eCAL::Init::Monitoring); | ||
eCAL::Initialize(0, nullptr, "eCALMon", eCAL::Init::Default | eCAL::Init::Monitoring | eCAL::Init::UDPLogReceive); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no header providing "eCAL::Init::Monitoring" is directly included [misc-include-cleaner] eCAL::Initialize(0, nullptr, "eCALMon", eCAL::Init::Default | eCAL::Init::Monitoring | eCAL::Init::UDPLogReceive);
^ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no header providing "eCAL::Init::UDPLogReceive" is directly included [misc-include-cleaner] eCAL::Initialize(0, nullptr, "eCALMon", eCAL::Init::Default | eCAL::Init::Monitoring | eCAL::Init::UDPLogReceive);
^ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no header providing "eCAL::Initialize" is directly included [misc-include-cleaner] app/mon/mon_gui/src/ecalmon.cpp:24: - #include "widgets/about_dialog/about_dialog.h"
+ #include "ecal/ecal_core.h"
+ #include "widgets/about_dialog/about_dialog.h" |
||
eCAL::Monitoring::SetFilterState(false); | ||
eCAL::Process::SetState(proc_sev_healthy, proc_sev_level1, "Running"); | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ int main(int argc, char** argv) | |
{ | ||
auto args = ParseArgs(argc, argv); | ||
|
||
auto status = eCAL::Initialize(0, nullptr, "eCALMon TUI", eCAL::Init::Default | eCAL::Init::Monitoring); | ||
auto status = eCAL::Initialize(0, nullptr, "eCALMon TUI", eCAL::Init::Default | eCAL::Init::Monitoring | eCAL::Init::UDPLogReceive); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no header providing "eCAL::Init::Default" is directly included [misc-include-cleaner] app/mon/mon_tui/src/main.cpp:28: - #include "tui/tui.hpp"
+ #include "ecal/ecal_init.h"
+ #include "tui/tui.hpp" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no header providing "eCAL::Init::Monitoring" is directly included [misc-include-cleaner] auto status = eCAL::Initialize(0, nullptr, "eCALMon TUI", eCAL::Init::Default | eCAL::Init::Monitoring | eCAL::Init::UDPLogReceive);
^ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no header providing "eCAL::Init::UDPLogReceive" is directly included [misc-include-cleaner] auto status = eCAL::Initialize(0, nullptr, "eCALMon TUI", eCAL::Init::Default | eCAL::Init::Monitoring | eCAL::Init::UDPLogReceive);
^ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no header providing "eCAL::Initialize" is directly included [misc-include-cleaner] app/mon/mon_tui/src/main.cpp:28: - #include "tui/tui.hpp"
+ #include "ecal/ecal_core.h"
+ #include "tui/tui.hpp" |
||
if (status == -1) std::cerr << "Failed to init" << std::endl; | ||
eCAL::Process::SetState(proc_sev_healthy, proc_sev_level1, "Running"); | ||
eCAL::Monitoring::SetFilterState(false); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ namespace eCAL | |
|
||
EcalRec::EcalRec() | ||
{ | ||
eCAL::Initialize(0, nullptr, "eCALRecClient", eCAL::Init::Default | eCAL::Init::Monitoring); | ||
eCAL::Initialize(0, nullptr, "eCALRecClient", eCAL::Init::Default | eCAL::Init::Monitoring | eCAL::Init::UDPLogReceive); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no header providing "eCAL::Init::Default" is directly included [misc-include-cleaner] app/rec/rec_client_core/src/ecal_rec.cpp:21: - #include "ecal_rec_impl.h"
+ #include "ecal/ecal_init.h"
+ #include "ecal_rec_impl.h" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no header providing "eCAL::Init::Monitoring" is directly included [misc-include-cleaner] eCAL::Initialize(0, nullptr, "eCALRecClient", eCAL::Init::Default | eCAL::Init::Monitoring | eCAL::Init::UDPLogReceive);
^ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no header providing "eCAL::Init::UDPLogReceive" is directly included [misc-include-cleaner] eCAL::Initialize(0, nullptr, "eCALRecClient", eCAL::Init::Default | eCAL::Init::Monitoring | eCAL::Init::UDPLogReceive);
^ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no header providing "eCAL::Initialize" is directly included [misc-include-cleaner] app/rec/rec_client_core/src/ecal_rec.cpp:21: - #include "ecal_rec_impl.h"
+ #include "ecal/ecal_core.h"
+ #include "ecal_rec_impl.h" |
||
eCAL::Monitoring::SetFilterState(false); | ||
|
||
recorder_ = std::make_unique<EcalRecImpl>(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -136,7 +136,7 @@ int main(int argc, char *argv[]) | |
} | ||
|
||
// Just make sure that eCAL is initialized | ||
eCAL::Initialize(0, nullptr, "eCALRecGUI", eCAL::Init::Default | eCAL::Init::Service | eCAL::Init::Monitoring); | ||
eCAL::Initialize(0, nullptr, "eCALRecGUI", eCAL::Init::Default | eCAL::Init::Service | eCAL::Init::Monitoring | eCAL::Init::UDPLogReceive); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no header providing "eCAL::Init::Default" is directly included [misc-include-cleaner] app/rec/rec_gui/src/main.cpp:19: - #include "ecalrec_gui.h"
+ #include "ecal/ecal_init.h"
+ #include "ecalrec_gui.h" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no header providing "eCAL::Init::Monitoring" is directly included [misc-include-cleaner] eCAL::Initialize(0, nullptr, "eCALRecGUI", eCAL::Init::Default | eCAL::Init::Service | eCAL::Init::Monitoring | eCAL::Init::UDPLogReceive);
^ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no header providing "eCAL::Init::Service" is directly included [misc-include-cleaner] eCAL::Initialize(0, nullptr, "eCALRecGUI", eCAL::Init::Default | eCAL::Init::Service | eCAL::Init::Monitoring | eCAL::Init::UDPLogReceive);
^ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no header providing "eCAL::Init::UDPLogReceive" is directly included [misc-include-cleaner] eCAL::Initialize(0, nullptr, "eCALRecGUI", eCAL::Init::Default | eCAL::Init::Service | eCAL::Init::Monitoring | eCAL::Init::UDPLogReceive);
^ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no header providing "eCAL::Initialize" is directly included [misc-include-cleaner] app/rec/rec_gui/src/main.cpp:19: - #include "ecalrec_gui.h"
+ #include "ecal/ecal_core.h"
+ #include "ecalrec_gui.h" |
||
eCAL::Monitoring::SetFilterState(false); | ||
|
||
EcalRecGui* w = new EcalRecGui(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,7 +60,7 @@ namespace eCAL | |
settings_.ClearHostFilter(); // There is no global host filter | ||
|
||
// Initialize eCAL | ||
eCAL::Initialize(0, nullptr, "eCALRec-Server", eCAL::Init::Default | eCAL::Init::Monitoring); | ||
eCAL::Initialize(0, nullptr, "eCALRec-Server", eCAL::Init::Default | eCAL::Init::Monitoring | eCAL::Init::UDPLogReceive); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no header providing "eCAL::Init::Default" is directly included [misc-include-cleaner] app/rec/rec_server_core/src/rec_server_impl.cpp:21: - #include "recorder_settings.h"
+ #include "ecal/ecal_init.h"
+ #include "recorder_settings.h" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no header providing "eCAL::Init::Monitoring" is directly included [misc-include-cleaner] eCAL::Initialize(0, nullptr, "eCALRec-Server", eCAL::Init::Default | eCAL::Init::Monitoring | eCAL::Init::UDPLogReceive);
^ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no header providing "eCAL::Init::UDPLogReceive" is directly included [misc-include-cleaner] eCAL::Initialize(0, nullptr, "eCALRec-Server", eCAL::Init::Default | eCAL::Init::Monitoring | eCAL::Init::UDPLogReceive);
^ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no header providing "eCAL::Initialize" is directly included [misc-include-cleaner] app/rec/rec_server_core/src/rec_server_impl.cpp:21: - #include "recorder_settings.h"
+ #include "ecal/ecal_core.h"
+ #include "recorder_settings.h" |
||
|
||
// Start FTP Server | ||
ftp_server_->start(5); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,19 +28,21 @@ namespace eCAL | |
{ | ||
namespace Init | ||
{ | ||
static const unsigned int Publisher = 0x001; | ||
static const unsigned int Subscriber = 0x002; | ||
static const unsigned int Service = 0x004; | ||
static const unsigned int Monitoring = 0x008; | ||
static const unsigned int Logging = 0x010; | ||
static const unsigned int TimeSync = 0x020; | ||
static const unsigned int Publisher = 0x001; | ||
static const unsigned int Subscriber = 0x002; | ||
static const unsigned int Service = 0x004; | ||
static const unsigned int Monitoring = 0x008; | ||
static const unsigned int Logging = 0x010; | ||
static const unsigned int TimeSync = 0x020; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you could realign, so you don't get any changes in this file |
||
static const unsigned int UDPLogReceive = 0x040; | ||
|
||
static const unsigned int All = Publisher | ||
| Subscriber | ||
| Service | ||
| Monitoring | ||
| Logging | ||
| TimeSync; | ||
| TimeSync | ||
| UDPLogReceive; | ||
|
||
static const unsigned int Default = Publisher | ||
| Subscriber | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -576,6 +576,22 @@ namespace YAML | |
/____/\___/\_, /\_, /_/_//_/\_, / | ||
/___//___/ /___/ | ||
*/ | ||
|
||
Node convert<eCAL::Logging::Sinks::UDPReceiver::Configuration>::encode(const eCAL::Logging::Sinks::UDPReceiver::Configuration& config_) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no header providing "eCAL::Logging::Sinks::UDPReceiver::Configuration" is directly included [misc-include-cleaner] ecal/core/src/config/configuration_to_yaml.cpp:1: + #include "ecal/config/logging.h" |
||
{ | ||
Node node; | ||
node["enable"] = config_.enable; | ||
node["port"] = config_.port; | ||
return node; | ||
} | ||
|
||
bool convert<eCAL::Logging::Sinks::UDPReceiver::Configuration>::decode(const Node& node_, eCAL::Logging::Sinks::UDPReceiver::Configuration& config_) | ||
{ | ||
AssignValue<bool>(config_.enable, node_, "enable"); | ||
AssignValue<unsigned int>(config_.port, node_, "port"); | ||
|
||
return true; | ||
} | ||
|
||
Node convert<eCAL::Logging::Sinks::UDP::Configuration>::encode(const eCAL::Logging::Sinks::UDP::Configuration& config_) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no header providing "eCAL::Logging::Sinks::UDP::Configuration" is directly included [misc-include-cleaner] Node convert<eCAL::Logging::Sinks::UDP::Configuration>::encode(const eCAL::Logging::Sinks::UDP::Configuration& config_)
^ |
||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -297,6 +297,14 @@ namespace YAML | |
/____/\___/\_, /\_, /_/_//_/\_, / | ||
/___//___/ /___/ | ||
*/ | ||
template<> | ||
struct convert<eCAL::Logging::Sinks::UDPReceiver::Configuration> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no header providing "eCAL::Logging::Sinks::UDPReceiver::Configuration" is directly included [misc-include-cleaner] ecal/core/src/config/configuration_to_yaml.h:26: - #include <ecal/config/configuration.h>
+ #include "ecal/config/logging.h"
+ #include <ecal/config/configuration.h> |
||
{ | ||
static Node encode(const eCAL::Logging::Sinks::UDPReceiver::Configuration& config_); | ||
|
||
static bool decode(const Node& node_, eCAL::Logging::Sinks::UDPReceiver::Configuration& config_); | ||
}; | ||
|
||
template<> | ||
struct convert<eCAL::Logging::Sinks::UDP::Configuration> | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "eCAL::Init::Default" is directly included [misc-include-cleaner]
app/mon/mon_gui/src/ecalmon.cpp:24: