using serilog (c#) in a vb.net
Hello,
I have an old application which is written in vb.net.
I'm searching for a sollution to use serilog.
On internet I found 1 entry which says I have to add serilog to the global.asax of vb.net.
In the global asax we need to add serilogger confioguration.
My problem is that I cant use Log.Information in the program itself.
Does anyone know a sollution. Im not a vb programmer
12 Replies
Unknown User•13mo ago
Message Not Public
Sign In & Join Server To View
Yes, there is a global asax and I'm not glad with this project
it's about 20 years old
If it isn't worth the time thats also an answer
Unknown User•13mo ago
Message Not Public
Sign In & Join Server To View
upgrading to 4.7.2 worked.
however the current logger is not working anymore
so i got a compatible serilogger
Unknown User•13mo ago
Message Not Public
Sign In & Join Server To View
You are completely right, no DI
still works with aspx. but this is what I was searching for. I'm gonna try it. Thanks
Unknown User•13mo ago
Message Not Public
Sign In & Join Server To View
Serilog.Log.Logger.Information()
and in globasl asax config
Unknown User•13mo ago
Message Not Public
Sign In & Join Server To View
Sorry it was just my translation how to do this,
Many thanks for the help. It looks like it works at least in the editor. I need to replace about 400 entries so I cant tell if the program works
Unknown User•13mo ago
Message Not Public
Sign In & Join Server To View
OK thanks,