Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

Commit 775cacf

Browse files
add log source context
1 parent 0e98241 commit 775cacf

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/SqlStreamStore.Server/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.Threading.Tasks;
55
using Microsoft.AspNetCore.Hosting;
66
using Serilog;
7+
using Serilog.Events;
78
using SqlStreamStore.HAL;
89

910
namespace SqlStreamStore.Server
@@ -31,7 +32,7 @@ private Program(SqlStreamStoreServerConfiguration configuration)
3132
Log.Logger = new LoggerConfiguration()
3233
.MinimumLevel.Is(configuration.LogLevel)
3334
.Enrich.FromLogContext()
34-
.WriteTo.Console()
35+
.WriteTo.Console(outputTemplate: "[{Timestamp:HH:mm:ss} {Level:u3}] [{SourceContext}] {Message:lj}{NewLine}{Exception}")
3536
.CreateLogger();
3637

3738
Log.Information(configuration.ToString());

0 commit comments

Comments
 (0)