summaryrefslogtreecommitdiffstats
path: root/Debug.cpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-05-13 16:01:56 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-05-13 16:01:56 +0200
commit1563ae5be6bc130a9b3a23464f7e28fdb1e87da3 (patch)
treeb1f65a03827494fa78e320b134f4cc7df54754bb /Debug.cpp
parent2017-05-12 (diff)
downloadAltCraft-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.cpp')
-rw-r--r--Debug.cpp39
1 files changed, 0 insertions, 39 deletions
diff --git a/Debug.cpp b/Debug.cpp
deleted file mode 100644
index eb8b2d2..0000000
--- a/Debug.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-#include "Debug.hpp"
-
-const bool isPrintSourceFile = false;
-const debug::LogLevel debugPrintLevel = debug::LogLevel::INFO;
-
-void ::debug::WriteLog(std::string message, debug::LogLevel level, debug::LogSource source, std::string sourceFile,
- int lineInFile) {
- if (debugPrintLevel > level)
- return;
- std::string levelText;
- switch (level) {
- case FATAL:
- levelText = "FATAL";
- break;
- case ERROR:
- levelText = "ERROR";
- break;
- case WARNING:
- levelText = "WARNING";
- break;
- case INFO:
- levelText = "INFO";
- break;
- case DEBUG:
- levelText = "DEBUG";
- break;
- }
- std::string file = " " + sourceFile + ":" + std::to_string(lineInFile);
- std::cout << "[" << levelText << "]: " << message << (isPrintSourceFile ? file : "") << std::endl;
- if (level <= LogLevel::ERROR) {
- if (level <= LogLevel::FATAL)
- exit(-1);
- Exception exception;
- exception.message = message;
- exception.level = level;
- exception.source = source;
- throw exception;
- }
-} \ No newline at end of file