Gateware Libraries  6.3.A
Beta Build
GLog.h
1 #ifndef GLOG_H
2 #define GLOG_H
3 
15 #include "../G_Core/GMultiThreaded.h"
17 
19 namespace GW
20 {
22  namespace SYSTEM
23  {
25  static const GUUIID GLogUUIID =
26  {
27  0x305fdf22, 0xa4ad, 0x40b9,{ 0x92, 0xb0, 0xe0, 0xf9, 0xdd, 0xc9, 0x7d, 0x1e }
28  };
29 
30  // Forward declaration so we can use GFile* in a function.
31  class GFile;
32 
33 
35 
39  class GLog : public CORE::GMultiThreaded
40  {
41  // All Gateware API interfaces contain no variables & are pure virtual.
42  public:
43 
45 
57  virtual GReturn Log(const char* const _log) = 0;
58 
60 
73  virtual GReturn LogCatergorized(const char* const _category, const char* const _log) = 0;
74 
76 
82  virtual GReturn EnableVerboseLogging(bool _value) = 0;
83 
85 
90  virtual GReturn EnableConsoleLogging(bool _value) = 0;
91 
93 
99  virtual GReturn Flush() = 0;
100  }; // end GLog class
101 
103 
116  GATEWARE_EXPORT_IMPLICIT GReturn CreateGLog(const char* const _fileName, GLog** _outLog);
117 
119 
132  GATEWARE_EXPORT_IMPLICIT GReturn CreateGLogCustom(GFile* _file, GLog** _outLog);
133  } // end CORE namespace
134 } // end GW namespace
135 
136 #endif
This interface is only used to label and query interfaces which promise to 100% internally support th...
Definition: GMultiThreaded.h:31
GATEWARE_EXPORT_IMPLICIT GReturn CreateGLog(const char *const _fileName, GLog **_outLog)
Creates a GLog object.
Cross platform FileIO/Directory handling.
Definition: GFile.h:35
GReturn
Listing of common error codes returned by Gateware functions.
Definition: GDefines.h:53
virtual GReturn Flush()=0
Forces a log dump to file.
Cross platform threadsafe logger.
Definition: GLog.h:39
GATEWARE_EXPORT_IMPLICIT GReturn CreateGLogCustom(GFile *_file, GLog **_outLog)
Creates a GLog object.
virtual GReturn Log(const char *const _log)=0
Logs a null terminated string.
virtual GReturn EnableVerboseLogging(bool _value)=0
Turns verbose logging on or off.
The core namespace to which all Gateware interfaces/structures/defines must belong.
Definition: GAudio.h:20
virtual GReturn LogCatergorized(const char *const _category, const char *const _log)=0
Logs a null terminated string with a category.
virtual GReturn EnableConsoleLogging(bool _value)=0
Turns console logging on or off.