Apache Flume is a distributed, reliable, and available service for efficiently collecting, aggregating, and moving large amounts of log data.
Flume has an appender for log4j, but no support for log4net or NLog was provided. I created a opensource appenders on GitHub.
Both of them are pretty straight forward to use with two steps:
1. Install the Nuget package
2. Configure the appender
<pre><code><configuration> <configSections> <section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog" /> </configSections> <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <extensions> <add assembly="DotNetFlumeNG.Client.NLog" /> </extensions> <targets> <target name="a1" type="Flume" host="yourflumeserver" port="yourflumeport" /> </targets> <rules> <logger name="*" minLevel="Info" appendTo="a1" /> </rules> </nlog> </configuration> </code></pre> <code> </code>
3. That’s it!
All existing logging code will now be logged to your existing flume services!