PLCnext API Documentation  22.9.0.33
Logger.hxx
1 //
3 // Copyright PHOENIX CONTACT Electronics GmbH
4 //
6 #pragma once
7 #include "Arp/System/Core/Arp.h"
8 #include "Arp/System/Core/TypeName.hxx"
9 #include "Arp/System/Commons/Diagnostics/Logging/LoggerBase.hxx"
10 
11 namespace Arp { namespace System { namespace Commons { namespace Diagnostics { namespace Logging
12 {
13 
14 // forwards
15 template<typename T, bool, bool> class Loggable;
16 
17 template<class T = void>
18 class Logger : public LoggerBase
19 {
20  // friends
21  template<typename K, bool, bool> friend class Loggable;
22 
23 private: // construction/destruction
24  Logger(void);
25 
26 public: // construction/destruction
27  Logger(const Logger& arg) = default;
28  ~Logger(void) = default;
29 
30 public: // operators
31  Logger& operator=(const Logger& arg) = default;
32 };
33 
35 // inline methods of class Logger
36 
37 template<class T>
38 inline Logger<T>::Logger(void)
39  : LoggerBase()
40 {
41 }
42 
44 // template specialization class Logger<void>
45 
46 template<>
47 class Logger<void> : public LoggerBase
48 {
49 public:
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 
68 public: // 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