zdk.net
Log.h
1 //
2 // Log.h
3 // ZDK
4 //
5 
6 #ifndef ZDK_NET_Log_h
7 #define ZDK_NET_Log_h
8 
9 #include "native_shared_ptr.h"
10 #include "PublicInterfaces.h"
11 #include "LoggingFacility.h"
12 #include "LoggingLevel.h"
13 #include "Result.h"
14 #include "ZHandle.h"
15 
16 using namespace System::Collections::Generic;
17 
18 namespace ZDK_NET
19 {
20  ref class Result;
21 
24  public ref class Log : ZHandle
25  {
26  public:
27  ZDK::ILog* cppRef = nullptr;
28 
29  Log(ZDK::Shared::Log src);
30  ~Log();
31  !Log();
32 
41  property List<ZDK_NET::LoggingFacility>^ ActiveFacilities
42  {
43  List<ZDK_NET::LoggingFacility>^ get();
44  void set(List<ZDK_NET::LoggingFacility>^ value);
45  }
46 
99  ZDK_NET::Result^ LogOpen(System::String^ fileName, System::String^ oldFileName, ZDK_NET::LoggingLevel maxLevel, long long maxSizeBytes);
100 
131  void LogMessage(ZDK_NET::LoggingLevel level, ZDK_NET::LoggingFacility facility, System::String^ facilityName, System::String^ sourceFileName, int sourceLine, System::String^ message);
132 
142 
151  bool ShouldLogFacility(ZDK_NET::LoggingFacility value);
152 
153  virtual long long Handle() override;
154 
155  virtual void Initialize() override;
156 
157  virtual void ReleaseReference() override;
158 
159  };
160 }
161 
162 #endif
ZDK_NET::Result
API invocation status result.
Definition: Result.h:24
ZDK_NET::Log::LogOpen
ZDK_NET::Result ^ LogOpen(System::String^ fileName, System::String^ oldFileName, ZDK_NET::LoggingLevel maxLevel, long long maxSizeBytes)
Starts logging.
ZDK_NET::Log::LogClose
ZDK_NET::Result ^ LogClose()
Stops logging.
ZDK_NET::Log
Debug logging facility.
Definition: Log.h:25
ZDK_NET::Log::LogMessage
void LogMessage(ZDK_NET::LoggingLevel level, ZDK_NET::LoggingFacility facility, System::String^ facilityName, System::String^ sourceFileName, int sourceLine, System::String^ message)
Log a message.
ZDK_NET::Log::ShouldLogFacility
bool ShouldLogFacility(ZDK_NET::LoggingFacility value)
Checks whether the given logging facility is enabled.
ZDK_NET::ZHandle
Definition: ZHandle.h:18