I have added a custom property to my Serilog appsettings.json

"Serilog": { "Using": [], "MinimumLevel": { "Default": "Information", "Override": { "Microsoft": "Information", "System": "Warning" } }, "Properties": { "Application": "MyAppName" }, ...

When I write this:

Log.Information("[{Application}] This is my message");

I get this output: [MyAppName] This is my message

When I write this

Log.Information("[{Application}] This is my message with ekstra property {number}", "111");

I get this output: [111] This is my message with ekstra property

but I expected this output: [MyAppName] This is my message with ekstra property 111

How can I achive the expected ouput, using custom properties?

René AD's user avatar

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.