Reputation: 335
Who use log4net with logentries? I was did all on documentation Application mvc asp. Token get from Logging's settings .
<appSettings>
<add key="Logentries.Token" value="...xx-xx-xx..." />
...
</appSettings>
<log4net>
<appender name="LeAppender" type="log4net.Appender.LogentriesAppender, LogentriesLog4net">
<token value="...xx-xx-xx..." />
....
</appender>
This settings duplicated in App.config and Web.config In script
Log.Info("check log...");
log4net write in .txt file, but not send to site. Why? (
Upvotes: 0
Views: 314
Reputation: 1715
I had similar issue then found the root cause is about connection to LE is blocking at the network, but must check below points:
Configure log4net in AssemblyInfo.cs but you have log in .txt file so it should be OK: [assembly: log4net.Config.XmlConfigurator(Watch = true)]
Be sure to have correct token in appSettings: <add key="Logentries.Token" value="XYZ...."/>
Debugging your app, check Output/Debug console it will tell the detail
Upvotes: 1