summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-08-10 21:10:47 +0200
committerTycho <work.tycho+git@gmail.com>2014-08-10 21:10:47 +0200
commitbe780b380ee91f5de27eecb3d8809506d4198534 (patch)
treef8c68d8eaf4b4c4f07ffb7293474d92a12151b6f /Tools
parentAdded forgoten files (diff)
downloadcuberite-be780b380ee91f5de27eecb3d8809506d4198534.tar
cuberite-be780b380ee91f5de27eecb3d8809506d4198534.tar.gz
cuberite-be780b380ee91f5de27eecb3d8809506d4198534.tar.bz2
cuberite-be780b380ee91f5de27eecb3d8809506d4198534.tar.lz
cuberite-be780b380ee91f5de27eecb3d8809506d4198534.tar.xz
cuberite-be780b380ee91f5de27eecb3d8809506d4198534.tar.zst
cuberite-be780b380ee91f5de27eecb3d8809506d4198534.zip
Diffstat (limited to 'Tools')
-rw-r--r--Tools/MCADefrag/CMakeLists.txt6
-rw-r--r--Tools/MCADefrag/MCADefrag.cpp16
-rw-r--r--Tools/ProtoProxy/CMakeLists.txt6
3 files changed, 18 insertions, 10 deletions
diff --git a/Tools/MCADefrag/CMakeLists.txt b/Tools/MCADefrag/CMakeLists.txt
index 2a021049f..e237b6429 100644
--- a/Tools/MCADefrag/CMakeLists.txt
+++ b/Tools/MCADefrag/CMakeLists.txt
@@ -39,14 +39,12 @@ set_exe_flags()
set(SHARED_SRC
../../src/StringCompression.cpp
../../src/StringUtils.cpp
- ../../src/Log.cpp
- ../../src/MCLogger.cpp
+ ../../src/Listeners.cpp
+ ../../src/LogDispacher.cpp
)
set(SHARED_HDR
../../src/ByteBuffer.h
../../src/StringUtils.h
- ../../src/Log.h
- ../../src/MCLogger.h
)
flatten_files(SHARED_SRC)
flatten_files(SHARED_HDR)
diff --git a/Tools/MCADefrag/MCADefrag.cpp b/Tools/MCADefrag/MCADefrag.cpp
index a2de7f957..702b04ebf 100644
--- a/Tools/MCADefrag/MCADefrag.cpp
+++ b/Tools/MCADefrag/MCADefrag.cpp
@@ -5,7 +5,8 @@
#include "Globals.h"
#include "MCADefrag.h"
-#include "MCLogger.h"
+#include "LogDispacher.h"
+#include "Listeners.h"
#include "zlib/zlib.h"
@@ -21,7 +22,13 @@ static const Byte g_Zeroes[4096] = {0};
int main(int argc, char ** argv)
{
- new cMCLogger(Printf("Defrag_%08x.log", time(NULL)));
+ Logger::cLoggerListener * consoleLogListener = Logger::MakeConsoleListener();
+ Logger::cLoggerListener * fileLogListener = new Logger::cFileListener();
+ Logger::GetInstance().AttachListener(consoleLogListener);
+ Logger::GetInstance().AttachListener(fileLogListener);
+
+ Logger::InitiateMultithreading();
+
cMCADefrag Defrag;
if (!Defrag.Init(argc, argv))
{
@@ -30,6 +37,11 @@ int main(int argc, char ** argv)
Defrag.Run();
+ Logger::GetInstance().DetachListener(consoleLogListener);
+ delete consoleLogListener;
+ Logger::GetInstance().DetachListener(fileLogListener);
+ delete fileLogListener;
+
return 0;
}
diff --git a/Tools/ProtoProxy/CMakeLists.txt b/Tools/ProtoProxy/CMakeLists.txt
index f0796363c..16c59bb43 100644
--- a/Tools/ProtoProxy/CMakeLists.txt
+++ b/Tools/ProtoProxy/CMakeLists.txt
@@ -34,20 +34,18 @@ set_exe_flags()
set(SHARED_SRC
../../src/ByteBuffer.cpp
../../src/StringUtils.cpp
- ../../src/Log.cpp
- ../../src/MCLogger.cpp
../../src/PolarSSL++/AesCfb128Decryptor.cpp
../../src/PolarSSL++/AesCfb128Encryptor.cpp
../../src/PolarSSL++/CryptoKey.cpp
../../src/PolarSSL++/CtrDrbgContext.cpp
../../src/PolarSSL++/EntropyContext.cpp
../../src/PolarSSL++/RsaPrivateKey.cpp
+ ../../src/Listeners.cpp
+ ../../src/LogDispacher.cpp
)
set(SHARED_HDR
../../src/ByteBuffer.h
../../src/StringUtils.h
- ../../src/Log.h
- ../../src/MCLogger.h
../../src/PolarSSL++/AesCfb128Decryptor.h
../../src/PolarSSL++/AesCfb128Encryptor.h
../../src/PolarSSL++/CryptoKey.h