How can I capture logs from .net WebHost in our own logger?
There is proopably some simple answer this but after trawling the internet for hours, I have not yet found an answer
There is proopably some simple answer this but after trawling the internet for hours, I have not yet found an answer
I’m working with Nlog in an Asp.net framework application in a lan enviroment.
I have 10 different clients that use the application. My goal is to have different log file, one for each client. My Nlog configuration is:
How can I log all handled exceptions?
I have created an ASP.NET Core 3.1 application. The application is deployed to a Azure App Service. In the project I make use of logging, but the problem is that I can’t view the logs on Azure via Log Stream.
The default API example in Visual Studio 2019 instantiates an ILogger<T>. If I invoke it via _logger.Log(LogLevel.Information, "hello") how can I view the log file? This question assumes use of Azure App Service.
I’d like to get stories on how people are handling tracing and logging in real applications. Here are some questions that might help to explain your answer. Frameworks What frameworks do you use? log4net System.Diagnostics.Trace System.Diagnostics.TraceSource Logging application block Other? If you use tracing, do you make use of Trace.Correlation.StartLogicalOperation? Do you write this code … Read more
I currently write all log4net events to a database, and it seems to work just fine. To capture the logged in user account I use this piece of code:
I have created a simple scenario using Log4net, but it seems that my log appenders do not work because the messages are not added to the log file.
We have two different asp.net applications with Log4net logging enabled.
They both have the same version of Log4Net, 1.2.10.0.
We are using the excellent ELMAH to deal with unhandled exceptions in an ASP.NET 3.5 web application. This works extremely well for all of the site apart from WCF services which are being consumed using the REST features. When an exception occurs within the operation methods that is not handled by the application code, WCF handles it in various ways depending on the service contracts and configuration settings. This means that the exception does not end up firing the ASP.NET HttpApplication.Error event that ELMAH uses. The two solutions I am aware of to deal with this are: