Will
Will

Reputation: 2880

Log4Net log to application insights and to a file

I'm using Log4Net and Application Insights. I'm successfully logging to app insights using the Microsoft.ApplicationInsights.Log4NetAppender package but this stops all logging to my log file on the server. Ideally, I'd like to have Log4Net send data to app insights but also maintain my RollingFileAppender as well. Is this possible?

Upvotes: 0

Views: 572

Answers (1)

Peter
Peter

Reputation: 27944

Yes you can just add both appenders to your logging configuration. Both appenders will log.

Upvotes: 2

Related Questions