Fixed log files' timestamps
Also made Release mode log less technical information about the world storage threads.
This commit is contained in:
parent
d961693020
commit
882f7c70c0
@ -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:
|
||||
|
@ -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...");
|
||||
|
@ -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");
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user