I'm trying to setup loggly with a C# projet by following the Loggly tutorial but it doesn't work.
I've added the log4net-loggly
nuget package
I've add the following code in my app.config
:
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
<log4net>
<root>
<level value="ALL" />
<appender-ref ref="LogglyAppender" />
</root>
<appender name="LogglyAppender" type="log4net.loggly.LogglyAppender, log4net-loggly">
<rootUrl value="https://xxxxx.loggly.com/" />
<inputKey value="XXXXX" />
<tag value="log4net" />
</appender>
</log4net>
And this is how I'm trying to send logs to Loggly :
var logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
logger.Error("your log message", new Exception("your exception message"));
I've debugged with Fiddler to see if there was a request to Loggly but there is nothing.
What am I missing ?