You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2022/04/25 23:54:14 UTC
[skywalking-java] branch main updated: Change the dateformat of logs to yyyy-MM-dd HH:mm:ss.SSS (#165)
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-java.git
The following commit(s) were added to refs/heads/main by this push:
new 8ae57d25a Change the dateformat of logs to yyyy-MM-dd HH:mm:ss.SSS (#165)
8ae57d25a is described below
commit 8ae57d25a02fbd62575de655ac8189f3aacc27b6
Author: Anders Guo <gx...@gmail.com>
AuthorDate: Tue Apr 26 07:54:10 2022 +0800
Change the dateformat of logs to yyyy-MM-dd HH:mm:ss.SSS (#165)
---
CHANGES.md | 1 +
.../apm/agent/core/logging/core/converters/DateConverter.java | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/CHANGES.md b/CHANGES.md
index 23f81e43e..10f0475ee 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -11,6 +11,7 @@ Release Notes.
* Add servicecomb-2.x plugin and Testcase.
* Fix NPE in gateway plugin when the timer triggers webflux webclient call.
* Add an optional plugin, trace-sampler-cpu-policy-plugin, which could disable trace collecting in high CPU load.
+* Change the dateformat of logs to `yyyy-MM-dd HH:mm:ss.SSS`(was `yyyy-MM-dd HH:mm:ss:SSS`).
#### Documentation
diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/logging/core/converters/DateConverter.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/logging/core/converters/DateConverter.java
index 8bfcdc623..1ebfdbf13 100644
--- a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/logging/core/converters/DateConverter.java
+++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/logging/core/converters/DateConverter.java
@@ -31,7 +31,7 @@ public class DateConverter implements Converter {
@Override
public String convert(LogEvent logEvent) {
- return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS").format(new Date());
+ return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date());
}
@Override