Hi,
I want to remove spaces from my logs using gsub. How can I do that.
Below is my multiline logs. for some of the line I am using grok, and for some of the logs I'll use KV to parse the data as it is in kv format in between of the log line, But due to multiple space in between the logs I'll face problem in parsing.
How to remove that.
"2020-04-19 21:49:58 DEBUG LoggingRequestInterceptor:28 - ============================request begin===========================================2020-04-19 21:49:58 DEBUG LoggingRequestInterceptor:29 - URI: https://bone01.bandhan.local/Bone/MobileDevice/1.0/1234/2020-04-19 21:49:58 DEBUG LoggingRequestInterceptor:30 - Method : POST2020-04-19 21:49:58 DEBUG LoggingRequestInterceptor:31 - Headers : [Accept:application/json, application/*+json, Content-Type:application/json, Content-Length:265]2020-04-19 21:49:58 DEBUG LoggingRequestInterceptor:32 - Request body: {ApplicationId:8,TriggeredByUserId:,ActionId:472,SqlScriptList:[{ScriptId:0,AddedOn:2020-04-19T21:49:58.485+05:30,PkeyId:null,ArgumentListLite:[{Fn:@deviceId,Fv:123456781},{Fn:@appId,Fv:123456781}]}],ResponseStatus:FAILURE}2020-04-19 21:49:58 DEBUG LoggingRequestInterceptor:33 - ==========================request end===============================================2020-04-19 21:50:00 DEBUG LoggingRequestInterceptor:43 - ============================response begin==========================================2020-04-19 21:50:00 DEBUG LoggingRequestInterceptor:44 - Status code : 200 OK2020-04-19 21:50:00 DEBUG LoggingRequestInterceptor:45 - Status text : OK2020-04-19 21:50:00 DEBUG LoggingRequestInterceptor:46 - Headers : [Cache-Control:no-cache, Pragma:no-cache, Content-Type:application/json; charset=utf-8, Expires:-1, Server:Microsoft-IIS/10.0, X-AspNet-Version:4.0.30319, X-Powered-By:ASP.NET, Date:Sun, 19 Apr 2020 17:13:25 GMT, Content-Length:522]2020-04-19 21:50:00 DEBUG LoggingRequestInterceptor:47 - Response body: {ApplicationId:0,TriggeredByUserId:,ActionId:0,ActionMethodName:,ActionNameSpace:,GroupMethodName:,GroupNameSpace:,NoOfArguments:0,RequestType:,MethodArg:[],DbTuple:[],SqlScriptList:[],Base64ObjectString:,DeviceTypeId:0,DeviceId:,DbTupleLite:[],ResponseStatus:FAILURE,ErrorMessage:Invalid object name 'DB_MICROBANKING.DBO.T_MBN_DSC_SUPER_USER'.,ErrorDetail:,ErrorCode:,ErrorLocation:}2020-04-19 21:50:00 DEBUG LoggingRequestInterceptor:48 - =======================response end=================================================",
"@timestamp" => 2020-05-12T08:11:28.232Z
Thanks,
Tahseen