diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2015-06-14 12:23:14 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2015-06-14 12:23:14 +0200 |
commit | 882f7c70c08c97cb95df580b17cdbc76679cfd78 (patch) | |
tree | dd53b111de60443649e7c51adab3c24579a30555 /src | |
parent | Merge pull request #2237 from lkolbly/master (diff) | |
download | cuberite-882f7c70c08c97cb95df580b17cdbc76679cfd78.tar cuberite-882f7c70c08c97cb95df580b17cdbc76679cfd78.tar.gz cuberite-882f7c70c08c97cb95df580b17cdbc76679cfd78.tar.bz2 cuberite-882f7c70c08c97cb95df580b17cdbc76679cfd78.tar.lz cuberite-882f7c70c08c97cb95df580b17cdbc76679cfd78.tar.xz cuberite-882f7c70c08c97cb95df580b17cdbc76679cfd78.tar.zst cuberite-882f7c70c08c97cb95df580b17cdbc76679cfd78.zip |
Diffstat (limited to '')
-rw-r--r-- | src/LoggerListeners.cpp | 18 | ||||
-rw-r--r-- | src/Root.cpp | 2 | ||||
-rw-r--r-- | src/WorldStorage/WorldStorage.cpp | 4 |
3 files changed, 12 insertions, 12 deletions
diff --git a/src/LoggerListeners.cpp b/src/LoggerListeners.cpp index 132751e8e..2e7c5f5bd 100644 --- a/src/LoggerListeners.cpp +++ b/src/LoggerListeners.cpp @@ -299,15 +299,15 @@ cLogger::cListener * MakeConsoleListener(bool a_IsService) cFileListener::cFileListener(void) { cFile::CreateFolder(FILE_IO_PREFIX + AString("logs")); - AString FileName; - auto time = std::chrono::system_clock::now(); - FileName = Printf( - "%s%sLOG_%d.txt", - FILE_IO_PREFIX, - "logs/", - std::chrono::duration_cast<std::chrono::duration<int, std::milli>>(time.time_since_epoch()).count() + m_File.Open( + FILE_IO_PREFIX + Printf( + "logs/LOG_%lld.txt", + std::chrono::duration_cast<std::chrono::seconds>( + std::chrono::system_clock::now().time_since_epoch() + ).count() + ), + cFile::fmAppend ); - m_File.Open(FileName, cFile::fmAppend); } @@ -326,7 +326,7 @@ void cFileListener::Log(AString a_Message, cLogger::eLogLevel a_LogLevel) } case cLogger::llInfo: { - LogLevelPrefix = "info "; + LogLevelPrefix = "Info "; break; } case cLogger::llWarning: diff --git a/src/Root.cpp b/src/Root.cpp index a84a3db57..5720f5c0d 100644 --- a/src/Root.cpp +++ b/src/Root.cpp @@ -261,7 +261,7 @@ void cRoot::Start(std::unique_ptr<cSettingsRepositoryInterface> overridesRepo) delete m_FurnaceRecipe; m_FurnaceRecipe = nullptr; delete m_CraftingRecipes; m_CraftingRecipes = nullptr; - LOGD("Unloading worlds..."); + LOG("Unloading worlds..."); UnloadWorlds(); LOGD("Stopping plugin manager..."); diff --git a/src/WorldStorage/WorldStorage.cpp b/src/WorldStorage/WorldStorage.cpp index c7a295175..7e6cadb7e 100644 --- a/src/WorldStorage/WorldStorage.cpp +++ b/src/WorldStorage/WorldStorage.cpp @@ -84,7 +84,7 @@ void cWorldStorage::Stop(void) void cWorldStorage::WaitForFinish(void) { - LOG("Waiting for the world storage to finish saving"); + LOGD("Waiting for the world storage to finish saving"); { m_LoadQueue.Clear(); @@ -97,7 +97,7 @@ void cWorldStorage::WaitForFinish(void) m_ShouldTerminate = true; m_Event.Set(); // Wake up the thread if waiting super::Wait(); - LOG("World storage thread finished"); + LOGD("World storage thread finished"); } |