Skip to content

RoninWest/log4net-loggly

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 

Repository files navigation

log4net-loggly

Custom log4net appenders for importing logging events to loggly. Note that this fork supports log4net v1.2.10 and bump .NET framework to 4.5.1. The main branch supports the latest vesrion of log4net.

Add the following code in your web.config to configure LogglyAppender in your application

<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="http://logs-01.loggly.com/" />
    <inputKey value="your-customer-token" />
  </appender>
</log4net>

Create an object of the Log class using LogManager

var logger = LogManager.GetLogger(typeof(Class));

Send logs to Loggly using the following code

logger.Info("log message");

About

log4net-loggly

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C# 82.5%
  • PowerShell 17.5%