```
The configuration specifies two appenders:
1. RollingFileAppender
2. HTTPAppender
Both of these appenders have been placed inside the `AsyncBufferingForwardingAppender` which buffers and batches up the events then pushes the entries to each of them in order.
So in addition to the log events being persisted to a log file they are also serialized to _JSON_ and asynchronously _POSTed_ to an endpoint specified at: `http://localhost:1234`. All of this has been implemented in an efficient manner to reduce _GC_ and overhead.
A sample Web server (not suitable for production) which only accepts valid log payloads has been implemented as [`EasyLogListener`](https://github.com/NimaAra/Easy.Logger/blob/master/Easy.Logger.Tests.Integration/EasyLogListener.cs) and the models for deserializing the _JSON_ payload can be found in [`LogPayload`](https://github.com/NimaAra/Easy.Logger/blob/master/Easy.Logger.Tests.Integration/Models/LogPayload.cs). For more info on sending and receiving the log messages, take a look at the [Easy.Logger.Tests.Integration](https://github.com/NimaAra/Easy.Logger/tree/master/Easy.Logger.Tests.Integration) project.
Given the following log entries:
```csharp
logger.Debug("Something is about to happen...");
logger.InfoFormat("What's your number? It's: {0}", 1234);
logger.Error("Ooops I did it again!", new ArgumentNullException("cooCoo"));
logger.FatalFormat("Going home now {0}", new ApplicationException("CiaoCiao"));
```
The following payload will then be received at the endpoint:
```json
{
"pid": "12540",
"processName": "SampleApp.x32",
"host": "TestServer-01",
"sender": "SampleApp",
"timestampUTC": "2017-09-17T16:27:14.9377168+00:00",
"batchNo": 1,
"entries": [
{
"dateTimeOffset": "2017-09-17T17:27:14.4107128+01:00",
"loggerName": "Sample.Program",
"level": "DEBUG",
"threadID": "1",
"message": "Something is about to happen...",
"exception": null
},
{
"dateTimeOffset": "2017-09-17T17:27:14.4147491+01:00",
"loggerName": "Sample.Program",
"level": "INFO",
"threadID": "1",
"message": "What's your number? It's: 1234",
"exception": null
},
{
"dateTimeOffset": "2017-09-17T17:27:14.4182507+01:00",
"loggerName": "Sample.Program",
"level": "ERROR",
"threadID": "1",
"message": "Ooops I did it again!",
"exception": {
"ClassName": "System.ArgumentNullException",
"Message": "Value cannot be null.",
"Data": null,
"InnerException": null,
"HelpURL": null,
"StackTraceString": null,
"RemoteStackTraceString": null,
"RemoteStackIndex": 0,
"ExceptionMethod": null,
"HResult": -2147467261,
"Source": null,
"WatsonBuckets": null,
"ParamName": "cooCoo"
}
},
{
"dateTimeOffset": "2017-09-17T17:27:14.4187508+01:00",
"loggerName": "Sample.Program",
"level": "FATAL",
"threadID": "1",
"message": "Going home now System.ApplicationException: CiaoCiao",
"exception": null
}
]
}
```
* Requires minimum NET 4.5 or netstandard1.3.