# Log4net parsing with Logstash

**URL:** <https://discuss.elastic.co/t/log4net-parsing-with-logstash/64281>\
**Category:** Logstash\
**Created:** [October 28, 2016, 12:46pm UTC](https://discuss.elastic.co/t/log4net-parsing-with-logstash/64281 "2016-10-28T12:46:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmehraban](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@mmehraban](https://discuss.elastic.co/u/mmehraban)\
**Post date:** [October 28, 2016, 12:46pm UTC](https://discuss.elastic.co/t/log4net-parsing-with-logstash/64281/1 "2016-10-28T12:46:50Z")

</div>

I want to pars log4net file which I put a part of the log file here 🙂

2016-10-17 03:20:37,690 [319299] ERROR Global - Unhandled application error  
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.  
Parameter name: count  
at System.Web.HttpRequest.BinaryRead(Int32 count)  
at Telmetrics.Madison.Core.Helper.WebHelper.ReadRequestDataAsByteArray() in C:\BuildAgent\work\c32ad01eae0d37ff\src\OrderingAndReports\Telmetrics.Madison.Core\Helper\WebHelper.cs:line 27  
at Telmetrics.Madison.Core.Helper.WebHelper.ReadRequestDataAsString() in C:\BuildAgent\work\c32ad01eae0d37ff\src\OrderingAndReports\Telmetrics.Madison.Core\Helper\WebHelper.cs:line 42  
at Telmetrics.Madison.WebApiService.Middleware.Logging.LoggingMiddleware.LogHttpRequest(IOwinRequest request) in C:\BuildAgent\work\c32ad01eae0d37ff\src\OrderingAndReports\Telmetrics.Madison.WebApiService\Middleware\Logging\LoggingMiddleware.cs:line 71  
at Telmetrics.Madison.WebApiService.Middleware.Logging.LoggingMiddleware.d\_\_5.MoveNext() in C:\BuildAgent\work\c32ad01eae0d37ff\src\OrderingAndReports\Telmetrics.Madison.WebApiService\Middleware\Logging\LoggingMiddleware.cs:line 46  
--- End of stack trace from previous location where exception was thrown ---  
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)  
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)  
at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContextStage.d\_\_5.MoveNext()  
--- End of stack trace from previous location where exception was thrown ---  
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)  
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)  
at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.d\_\_2.MoveNext()  
--- End of stack trace from previous location where exception was thrown ---  
at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.StageAsyncResult.End(IAsyncResult ar)  
at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()  
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

I've tried several solutions,but I want to know which one is better for logstash filter.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:32am UTC](https://discuss.elastic.co/t/log4net-parsing-with-logstash/64281/2 "2017-07-06T04:32:10Z")

</div>


