PLCnext API Documentation 23.6.0.37
Logger.hxx
1
2//
3// Copyright PHOENIX CONTACT Electronics GmbH
4//
6#pragma once
8#include "Arp/System/Core/TypeName.hxx"
9#include "Arp/System/Commons/Diagnostics/Logging/LoggerBase.hxx"
10
11namespace Arp { namespace System { namespace Commons { namespace Diagnostics { namespace Logging
12{
13
14// forwards
15template<typename T, bool, bool> class Loggable;
16
17template<class T = void>
18class Logger : public LoggerBase
19{
20 // friends
21 template<typename K, bool, bool> friend class Loggable;
22
23private: // construction/destruction
24 Logger(void);
25
26public: // construction/destruction
27 Logger(const Logger& arg) = default;
28 ~Logger(void) = default;
29
30public: // operators
31 Logger& operator=(const Logger& arg) = default;
32};
33
35// inline methods of class Logger
36
37template<class T>
38inline Logger<T>::Logger(void)
39 : LoggerBase()
40{
41}
42
44// template specialization class Logger<void>
45
46template<>
47class Logger<void> : public LoggerBase
48{
49public:
50 Logger(void)
51 : LoggerBase()
52 {
53 }
54
55 Logger(const String& loggerName)
56 : LoggerBase(loggerName)
57 {
58 }
59
60 Logger(const char* pLoggerName)
61 : LoggerBase(pLoggerName)
62 {
63 }
64
65 Logger(const Logger& arg) = default;
66 ~Logger(void) = default;
67
68public: // operators
69 Logger& operator=(const Logger& arg) = default;
70};
71
72}}}}} // end of namesapce Arp::System::Commons::Diagnostics::Logging
@ System
System components used by the System, Device, Plc or Io domains.
Root namespace for the PLCnext API