diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-05-13 16:01:56 +0200 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-05-13 16:01:56 +0200 |
commit | 1563ae5be6bc130a9b3a23464f7e28fdb1e87da3 (patch) | |
tree | b1f65a03827494fa78e320b134f4cc7df54754bb /Debug.hpp | |
parent | 2017-05-12 (diff) | |
download | AltCraft-1563ae5be6bc130a9b3a23464f7e28fdb1e87da3.tar AltCraft-1563ae5be6bc130a9b3a23464f7e28fdb1e87da3.tar.gz AltCraft-1563ae5be6bc130a9b3a23464f7e28fdb1e87da3.tar.bz2 AltCraft-1563ae5be6bc130a9b3a23464f7e28fdb1e87da3.tar.lz AltCraft-1563ae5be6bc130a9b3a23464f7e28fdb1e87da3.tar.xz AltCraft-1563ae5be6bc130a9b3a23464f7e28fdb1e87da3.tar.zst AltCraft-1563ae5be6bc130a9b3a23464f7e28fdb1e87da3.zip |
Diffstat (limited to 'Debug.hpp')
-rw-r--r-- | Debug.hpp | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/Debug.hpp b/Debug.hpp deleted file mode 100644 index 1a9efb6..0000000 --- a/Debug.hpp +++ /dev/null @@ -1,43 +0,0 @@ -#pragma once - -#include <exception> -#include <queue> -#include <string> -#include <iostream> - -namespace debug { - - enum LogLevel { - FATAL = 0, - ERROR = 5, - WARNING = 10, - INFO = 15, - DEBUG = 20, - }; - - enum LogSource { - Unknown, - Display, - Network, - NetworkClient, - Game, - World, - Field, - Packet, - AssetManager, - }; - - struct Exception : public std::exception { - std::string message; - LogLevel level; - LogSource source; - - const char *what() const noexcept override{ - return this->message.c_str(); - } - }; - - void WriteLog(std::string message, LogLevel level = LogLevel::INFO, LogSource source = LogSource::Unknown, - std::string sourceFile = "", int lineInFile = 0); -#define LOG(MESSAGE, LEVEL, SOURCE) {using namespace debug; debug::WriteLog(MESSAGE,debug::LEVEL,debug::SOURCE,__FILE__,__LINE__);} -}
\ No newline at end of file |