Merge pull request #267 from openziti/ms_ts

Add fractional seconds (milliseconds) to logrus.JSONFormatter.
This commit is contained in:
Michael Quigley
2021-01-15 15:04:20 -05:00
committed by GitHub
7 changed files with 13 additions and 6 deletions
+7
View File
@@ -1,3 +1,10 @@
# Release 0.18.3
## What's New
* Ziti executables that use JSON logging now emit timestamps that include fractional seconds. Timestamps remain in
the RFC3339 format.
# Release 0.18.2
## What's New
+1 -1
View File
@@ -52,7 +52,7 @@ var root = &cobra.Command{
case "pfxlog":
logrus.SetFormatter(pfxlog.NewFormatterStartingToday())
case "json":
logrus.SetFormatter(&logrus.JSONFormatter{})
logrus.SetFormatter(&logrus.JSONFormatter{TimestampFormat: "2006-01-02T15:04:05.000Z"})
case "text":
logrus.SetFormatter(&logrus.TextFormatter{})
default:
@@ -58,7 +58,7 @@ var root = &cobra.Command{
case "pfxlog":
logrus.SetFormatter(pfxlog.NewFormatterStartingToday())
case "json":
logrus.SetFormatter(&logrus.JSONFormatter{})
logrus.SetFormatter(&logrus.JSONFormatter{TimestampFormat: "2006-01-02T15:04:05.000Z"})
case "text":
logrus.SetFormatter(&logrus.TextFormatter{})
default:
+1 -1
View File
@@ -46,7 +46,7 @@ var root = &cobra.Command{
case "pfxlog":
logrus.SetFormatter(pfxlog.NewFormatterStartingToday())
case "json":
logrus.SetFormatter(&logrus.JSONFormatter{})
logrus.SetFormatter(&logrus.JSONFormatter{TimestampFormat: "2006-01-02T15:04:05.000Z"})
case "text":
logrus.SetFormatter(&logrus.TextFormatter{})
default:
+1 -1
View File
@@ -43,7 +43,7 @@ var root = &cobra.Command{
case "pfxlog":
logrus.SetFormatter(pfxlog.NewFormatterStartingToday())
case "json":
logrus.SetFormatter(&logrus.JSONFormatter{})
logrus.SetFormatter(&logrus.JSONFormatter{TimestampFormat: "2006-01-02T15:04:05.000Z"})
case "text":
logrus.SetFormatter(&logrus.TextFormatter{})
default:
+1 -1
View File
@@ -42,7 +42,7 @@ var root = &cobra.Command{
case "pfxlog":
logrus.SetFormatter(pfxlog.NewFormatterStartingToday())
case "json":
logrus.SetFormatter(&logrus.JSONFormatter{})
logrus.SetFormatter(&logrus.JSONFormatter{TimestampFormat: "2006-01-02T15:04:05.000Z"})
case "text":
logrus.SetFormatter(&logrus.TextFormatter{})
default:
+1 -1
View File
@@ -78,7 +78,7 @@ func rootPreRun(cmd *cobra.Command, _ []string) {
case "pfxlog":
logrus.SetFormatter(pfxlog.NewFormatterStartingToday())
case "json":
logrus.SetFormatter(&logrus.JSONFormatter{})
logrus.SetFormatter(&logrus.JSONFormatter{TimestampFormat: "2006-01-02T15:04:05.000Z"})
case "text":
logrus.SetFormatter(&logrus.TextFormatter{})
default: