Hi,

Firstly, thanks for the response.

Tried what you have suggested and this is not working as this is now
escaping my delimiter which is the pipe ( | ) character. So if I use
EscapeChar '"' then the output of the log is incorrect.

Can you think of anything else or would only regex help?

Thanks,

Amit

On 16 October 2015 at 08:33, Botond Botyanszki <b...@nxlog.org> wrote:

> Hi,
>
> I think you need to add the following to your xm_csv instance:
>
>  EscapeChar '"'
>  EscapeControl FALSE
>
> The default value for EscapeChar is the backslash and most likely that's
> causing the windows pathnames to be mangled.
>
> Regards,
> Botond
>
> On Thu, 15 Oct 2015 20:34:27 +0100
> Amit Dattani <m...@amitdattani.com> wrote:
>
> > Hi,
> >
> > I am log shipping IIS Advanced Logs and one of the fields which we are
> > shipping is s-contentpath. This has a windows path in the output.
> >
> > When parsing this via csv and then converting to json, I see that the \
> > (backslash) is being removed from the path. I understand that this is by
> > design and wanted assistance in getting a regex (if that is what is
> > needed), to place a double backslash (\\) for each single backslash (\).
> >
> > Eg input
> > 144|148|213.229.90.97|"
> > *C:\Octopus\Applications\uat.bbbb.xxxx\yyyyxxxxx\2.6.5052.6*
> > "|-|2015-10-13|2015-10-13|”test.example.com
> >
> "|HEAD|"https"|"HTTP/1.1"|-|-|"MYSEREVR"|443|192.168.1.19|”MYSITE-SITE"|302|0|15|01:01:28.198|00:01:28.198|-|/uk|"Site24x7"|-|0
> >
> > Eg output (without regex)
> > {"EventReceivedTime":"2015-10-13
> >
> 17:23:19","SourceModuleName":"IIS_AdvancedLogs","SourceModuleType":"im_file","cs-bytes":"144","sc-bytes":"244","c-ip":”2.2.2.2","s-contentpath":”
> > *C:OctopusApplicationsuat.bbbb.xxxxyyyyxxxx2.6.5052.6*
> >
> ","cs(Cookie)":null,"date-local":"2015-10-1","date":"2015-10-1","cs(Host)”:”
> > test.example.com
> >
> ","cs-method":"HEAD","c-protocol":"https","cs-version":"HTTP/1.1","s-proxy":null,"cs(Referer)":null,"s-computername”:"MYSERVER","s-port":"443","s-ip":"192.168.1.19","s-sitename”:"MYSITE-SITE","sc-status":"302","sc-substatus":"0","TimeTakenMS":"0","time-local":"01:17:14.850","time":"00:17:14.850","cs-uri-query":null,"cs-uri-stem":"/uk","cs(User-Agent)":"Site24x7","cs-username":null,"sc-win32-status":"0"}
> >
> > Thanks in advance,
> >
> > Amit
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> nxlog-ce-users mailing list
> nxlog-ce-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users
>
------------------------------------------------------------------------------
_______________________________________________
nxlog-ce-users mailing list
nxlog-ce-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users

Reply via email to