OpenTwin
0.1
OpenTwin
Loading...
Searching...
No Matches
ServiceLogNotifier.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
OTCore/Logger.h
"
4
#include "
OTCore/Flags.h
"
5
#include "
OTCommunication/CommunicationAPIExport.h
"
6
#include "
OTCommunication/CommunicationTypes.h
"
7
8
#include <string>
9
#include <ostream>
10
#include <mutex>
11
#include <list>
12
13
#pragma warning (disable: 4251)
14
15
namespace
ot
{
16
17
class
OT_COMMUNICATION_API_EXPORT
ServiceLogNotifier
:
public
AbstractLogNotifier
{
18
public
:
19
static
ServiceLogNotifier
& instance(
void
);
20
static
ServiceLogNotifier
& initialize(
const
std::string& _serviceName,
const
std::string& _loggingServiceUrl,
bool
_addCoutReceiver =
false
);
21
22
// ###################################################################################################################################
23
24
// Setter/Getter
25
26
void
setLoggingServiceURL(
const
std::string& _url);
27
const
std::string&
loggingServiceURL
(
void
)
const
{
return
m_loggingServiceURL; };
28
29
// ###################################################################################################################################
30
31
void
log(
const
LogMessage
& _message);
32
33
private
:
34
std::string m_loggingServiceURL;
35
36
ServiceLogNotifier
();
37
virtual
~ServiceLogNotifier
();
38
39
ServiceLogNotifier
(
ServiceLogNotifier
&) =
delete
;
40
ServiceLogNotifier
& operator = (
ServiceLogNotifier
&) =
delete
;
41
};
42
43
}
CommunicationAPIExport.h
OT_COMMUNICATION_API_EXPORT
#define OT_COMMUNICATION_API_EXPORT
Definition
CommunicationAPIExport.h:6
CommunicationTypes.h
Flags.h
Logger.h
OpenTwin Logging system.
ot::AbstractLogNotifier
Used to receive every log message that is generated.
Definition
Logger.h:431
ot::LogMessage
Contains information about the origin and the content of a log message.
Definition
Logger.h:345
ot::ServiceLogNotifier
Definition
ServiceLogNotifier.h:17
ot::ServiceLogNotifier::loggingServiceURL
const std::string & loggingServiceURL(void) const
Definition
ServiceLogNotifier.h:27
ot
Definition
Connector.h:8
Libraries
OTCommunication
include
OTCommunication
ServiceLogNotifier.h
Generated by
1.10.0