log_event.h
Go to the documentation of this file.
1 // Log event with metadata
2 // Author: Max Schwarz <max.schwarz@ais.uni-bonn.de>
3 
4 #ifndef ROSMON_LOG_EVENT_H
5 #define ROSMON_LOG_EVENT_H
6 
7 #include <string>
8 
9 namespace rosmon
10 {
11 
12 struct LogEvent
13 {
14 public:
15  enum class Type
16  {
20  Raw,
21 
22  Info,
23  Warning,
24  Error
25  };
26 
27  enum class Channel
28  {
29  NotApplicable,
30  Stdout,
31  Stderr
32  };
33 
34  LogEvent(std::string source, std::string message, Type type = Type::Raw)
35  : source{std::move(source)}, message{std::move(message)}, type{type}
36  {}
37 
38  std::string source;
39  std::string message;
41  bool muted = false;
43  bool showStdout = true;
44 };
45 
46 }
47 
48 #endif
Channel channel
Definition: log_event.h:42
std::string source
Definition: log_event.h:38
LogEvent(std::string source, std::string message, Type type=Type::Raw)
Definition: log_event.h:34
std::string message
Definition: log_event.h:39


rosmon_core
Author(s): Max Schwarz
autogenerated on Sat Jan 9 2021 03:35:43