How to capture .net error logs with grok


I am new to ELK i am trying to setup grok pattern to capture some .net error logs. The logs look like this :

2017-03-20 17:52:31,020 [00000000-0000-0000-0000-000000000000] ERROR ABC.XYZervices.Logger.Log4NetLogger -
Error in Path :/Cover.svc/soap
Raw Url :/Cover.svc/soap
Message :Cannot access child value on Newtonsoft.Json.Linq.JValue.
Source :Newtonsoft.Json
Stack Trace : at Newtonsoft.Json.Linq.JToken.get_Item(Object key)
at ABC.XYZervices.DAL.Implementations.CoverDal.getCoverSummary_ClientDetail(JObject response) in c:\BuildAgent\work\9d7188be1901d649\ABC.XYZ.Services\OCSDAL\Implementations\Cover\CoverDAL.cs:line 774
at System.Threading.Tasks.Task.Execute()
TargetSite :Newtonsoft.Json.Linq.JToken get_Item(System.Object)

2017-03-20 17:52:31,528 [00000000-0000-0000-0000-000000000000] DEBUG ABC.XYZervices.Logger.Log4NetLogger - Calling ODS Service URI -\eschweig

The above are the two logs one is error and other is just debug log. Can any one help me how can i capture them with grok, will single pattern work for both error and debug ?


This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.