Closed psiservices-ketan-javia closed 1 month ago
Even normal logging statements (no ForContext
, just message template with those 2 columns) behave the same way.
Hi @psiservices-ketan-javia!
Have you tried to activate SelfLog as described in our documentation under Troubleshooting?
Without doing any debugging, I guess the reason is that you are passing the values to the Information() method with the wrong types.
Yes I have the debugging enabled. Changing the column types to match my variable types works. So it appears that Serilog doesn't implticlty try to convert to match the target data type.
No, it does not. You have to pass the property values with the correct types.
Given this config
Code doing logging below only populates the columns if I call
ToString()
on both properties.I would assume it would convert to string. Not a huge deal either way but took a while to figure this odd behavoir out. Not sure if I am missing any settings.
Packages
.netCore 8 OS: MacOS / Windows