Skip to content

Commit

Permalink
Fix timestamp log format (#377)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkbennett authored Apr 9, 2024
1 parent 06c9683 commit 383c4c3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/GitHubExtensionServer/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
{
"Name": "Console",
"Args": {
"outputTemplate": "[{Timestamp:yyyy/mm/dd HH:mm:ss.fff} {Level:u3}] ({SourceContext}) {Message:lj}{NewLine}{Exception}",
"outputTemplate": "[{Timestamp:yyyy/MM/dd HH:mm:ss.fff} {Level:u3}] ({SourceContext}) {Message:lj}{NewLine}{Exception}",
"restrictedToMinimumLevel": "Debug"
}
},
{
"Name": "File",
"Args": {
"path": "%DEVHOME_LOGS_ROOT%\\log.dhlog",
"outputTemplate": "[{Timestamp:yyyy/mm/dd HH:mm:ss.fff} {Level:u3}] ({SourceContext}) {Message:lj}{NewLine}{Exception}",
"outputTemplate": "[{Timestamp:yyyy/MM/dd HH:mm:ss.fff} {Level:u3}] ({SourceContext}) {Message:lj}{NewLine}{Exception}",
"restrictedToMinimumLevel": "Information",
"rollingInterval": "Day"
}
Expand Down
4 changes: 2 additions & 2 deletions test/Console/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
{
"Name": "Console",
"Args": {
"outputTemplate": "[{Timestamp:yyyy/mm/dd HH:mm:ss.fff} {Level:u3}] ({SourceContext}) {Message:lj}{NewLine}{Exception}",
"outputTemplate": "[{Timestamp:yyyy/MM/dd HH:mm:ss.fff} {Level:u3}] ({SourceContext}) {Message:lj}{NewLine}{Exception}",
"restrictedToMinimumLevel": "Debug"
}
},
{
"Name": "File",
"Args": {
"path": "%DEVHOME_LOGS_ROOT%\\log.dhlog",
"outputTemplate": "[{Timestamp:yyyy/mm/dd HH:mm:ss.fff} {Level:u3}] ({SourceContext}) {Message:lj}{NewLine}{Exception}",
"outputTemplate": "[{Timestamp:yyyy/MM/dd HH:mm:ss.fff} {Level:u3}] ({SourceContext}) {Message:lj}{NewLine}{Exception}",
"restrictedToMinimumLevel": "Information",
"rollingInterval": "Day"
}
Expand Down
4 changes: 2 additions & 2 deletions test/GitHubExtension/Helpers/TestSetupHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ public static void ConfigureTestLog(TestOptions options, TestContext context)
.WriteTo.File(
path: GetLogFilePath(options),
formatProvider: CultureInfo.InvariantCulture,
outputTemplate: "[{Timestamp:yyyy/mm/dd HH:mm:ss.fff} {Level:u3}] ({SourceContext}) {Message:lj}{NewLine}{Exception}")
outputTemplate: "[{Timestamp:yyyy/MM/dd HH:mm:ss.fff} {Level:u3}] ({SourceContext}) {Message:lj}{NewLine}{Exception}")
.WriteTo.TestContextSink(
context: context,
formatProvider: CultureInfo.InvariantCulture,
outputTemplate: "[{Timestamp:yyyy/mm/dd HH:mm:ss.fff} {Level:u3}] ({SourceContext}) {Message:lj}{NewLine}{Exception}")
outputTemplate: "[{Timestamp:yyyy/MM/dd HH:mm:ss.fff} {Level:u3}] ({SourceContext}) {Message:lj}{NewLine}{Exception}")
.CreateLogger();
}

Expand Down

0 comments on commit 383c4c3

Please sign in to comment.