Update logging system

- Update to fmt 6.0.0
- Updated logging system to be macro based
- Fixed a bug with including
This commit is contained in:
zhupengfei
2019-09-05 23:05:16 +08:00
parent 7941811fd8
commit ccffd51904
5 changed files with 45 additions and 31 deletions
+18
View File
@@ -0,0 +1,18 @@
// Copyright 2019 threeSD Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include <chrono>
#include "common/logging/log.h"
#include "common/string_util.h"
std::uint64_t GetLoggingTime() {
static auto time_origin = std::chrono::steady_clock::now();
return std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::steady_clock::now() -
time_origin)
.count();
}
std::string StandardizeLogClass(const std::string& log_class) {
return Common::ReplaceAll(log_class, "_", ".");
}