CyberEngineMkIII
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Logger.hpp
Go to the documentation of this file.
1 #pragma once
3 
4 namespace CYB {
5  namespace API {
7  class Logger {
8  public:
10  enum class Level : byte {
11  DEV,
12  INFO,
13  WARN,
14  ERR,
15  };
16  public:
27  virtual void Log(const String::CStyle& AMessage, const Level ALevel) = 0;
28 
34  virtual void Flush(void) const noexcept = 0;
35 
42  virtual const String::CStyle& CurrentLog(void) const noexcept = 0;
43 
50  virtual void SetDebugLogging(const bool AEnable) noexcept = 0;
51  };
52  };
53 };
unsigned char byte
It's a byte, 8 bits, etc...
Definition: Types.hpp:4
virtual void Log(const String::CStyle &AMessage, const Level ALevel)=0
Log a message. Will be written to a text file on the Path returned by CurrentLog. ...
Recoverable warnings.
virtual const String::CStyle & CurrentLog(void) const noexcept=0
Retrieve the string representation of the Path of the File the Logger is currently writing to...
Generic information.
virtual void Flush(void) const noexcept=0
Delays execution until all pending logs from the current thread have been written to the output...
virtual void SetDebugLogging(const bool AEnable) noexcept=0
Enable/Disable filtering of Level::DEV logs.
A basic char contained string.
Definition: CStyleString.hpp:7
Level
The severity of the log.
Definition: Logger.hpp:10
The interface for writing safe logs.
Definition: Logger.hpp:7
Debug messages, enabled/disabled by default in engine debug/release builds respectively.