Main Page
Namespaces
Classes
Files
File List
File Members
src
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
;
40
Type
type
;
41
bool
muted
=
false
;
42
Channel
channel
=
Channel::NotApplicable
;
43
bool
showStdout
=
true
;
44
};
45
46
}
47
48
#endif
rosmon::LogEvent::muted
bool muted
Definition:
log_event.h:41
rosmon::LogEvent::type
Type type
Definition:
log_event.h:40
rosmon::LogEvent::Channel::NotApplicable
rosmon::LogEvent
Definition:
log_event.h:12
rosmon
Definition:
diagnostics_publisher.cpp:34
rosmon::LogEvent::channel
Channel channel
Definition:
log_event.h:42
rosmon::LogEvent::Type
Type
Definition:
log_event.h:15
rosmon::LogEvent::Type::Warning
rosmon::LogEvent::showStdout
bool showStdout
Definition:
log_event.h:43
rosmon::LogEvent::Type::Raw
rosmon::LogEvent::Channel
Channel
Definition:
log_event.h:27
rosmon::LogEvent::Type::Error
rosmon::LogEvent::Type::Info
rosmon::LogEvent::source
std::string source
Definition:
log_event.h:38
rosmon::LogEvent::LogEvent
LogEvent(std::string source, std::string message, Type type=Type::Raw)
Definition:
log_event.h:34
rosmon::LogEvent::message
std::string message
Definition:
log_event.h:39
rosmon_core
Author(s): Max Schwarz
autogenerated on Sat Jan 9 2021 03:35:43