2
responses

Hello!

I have a question about IETFTimestampInGMT option.

In the documentation - section "Syslog (xm_syslog)" - I can read : "IETFTimestampInGMT This optional boolean directive can be used to format the timestamps produced by to_syslog_ietf() in GMT instead of local time. This defaults to FALSE so that local time is used by default with a timezone indicator"

So here's a part of my nxlog.conf :

<Extension _syslog>

    Module  xm_syslog

    IETFTimestampInGMT  TRUE

</Extension>

 

<Output  outUDP>

    Module om_file

    Exec log_info($Raw_event);parse_syslog_ietf(); log_info($EventTime);

    CreateDir TRUE

    Sync FALSE

    File "C:\\" + $SourceName + "\\out.log"

</Output>

 

Output :

<7>1 2017-10-10T12:30:59.308493+02:00 JohnDoe-PC appTest 3788 tag1 - Testing debug message

2017-10-10 12:30:59

 

(I tried to print $timestamp but nothing is printed.)

So I tought that setting IETFTimestampInGMT to true will convert the $EventTime in GMT but it didn't.

I checked the documentation and test different configurations, I should have misunderstood the way it works. What did I miss?

 

Thank you for your help :)

AskedOctober 10, 2017 - 3:38pm

Answer (1)

> ... produced by to_syslog_ietf() in ...

I don't see this anywhere in your conf.

On the other hand the upcoming beta of the EE has a DateFormat configuration option that will likely do what you need.

Comments (1)