aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2022-12-07 10:07:42 +0100
committerGitHub <[email protected]>2022-12-07 01:07:42 -0800
commitb9ec85a462317aa9dba39a9bfb6605f17b84bb22 (patch)
tree8d2a6d22303dc542f7b8243673061b27603a3d19
parentSize based gc trigger (#197) (diff)
downloadzen-b9ec85a462317aa9dba39a9bfb6605f17b84bb22.tar.xz
zen-b9ec85a462317aa9dba39a9bfb6605f17b84bb22.zip
Use Iso8601 format for logging start and end message (#202)
* Use Iso8601 format for logging start and end message * changelog
-rw-r--r--CHANGELOG.md1
-rw-r--r--zenserver/diag/logging.cpp5
2 files changed, 4 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2e21096ed..66cae5602 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,7 @@
- Improvement: Disk write pressure in GC log and cleaned up clutter in GC logging.
- Bugfix: Always store records or oplog entries before storing attachments to avoid GC finding unreferenced chunks i CidStore
- Changed: Reduced GC `INFO` spam by converting to `DEBUG` log messages
+- Changed: Use Iso8601 format for logging start and end message
## 0.1.9
- Feature: Adds two command to Zen command tool to export/import project store oplogs with attachments
diff --git a/zenserver/diag/logging.cpp b/zenserver/diag/logging.cpp
index dd9e3e806..1a8b427ca 100644
--- a/zenserver/diag/logging.cpp
+++ b/zenserver/diag/logging.cpp
@@ -28,6 +28,7 @@ ZEN_THIRD_PARTY_INCLUDES_START
#endif
ZEN_THIRD_PARTY_INCLUDES_END
+#include <zencore/compactbinary.h>
#include <zencore/filesystem.h>
#include <zencore/string.h>
@@ -505,13 +506,13 @@ InitializeLogging(const ZenServerOptions& GlobalOptions)
{
FileSink->set_pattern("[%C-%m-%d.%e %T] [%n] [%l] %v");
}
- DefaultLogger.info("log starting at {:%FT%T%z}", std::chrono::system_clock::now());
+ DefaultLogger.info("log starting at {}", zen::DateTime::Now().ToIso8601());
}
void
ShutdownLogging()
{
auto& DefaultLogger = zen::logging::Default();
- DefaultLogger.info("log ending at {:%FT%T%z}", std::chrono::system_clock::now());
+ DefaultLogger.info("log ending at {}", zen::DateTime::Now().ToIso8601());
zen::logging::ShutdownLogging();
}