Skip to content

add value() parameter to date-parser()#4319

Merged
alltilla merged 6 commits into
syslog-ng:masterfrom
bazsi:date-parser-add-value-parameter
Feb 14, 2023
Merged

add value() parameter to date-parser()#4319
alltilla merged 6 commits into
syslog-ng:masterfrom
bazsi:date-parser-add-value-parameter

Conversation

@bazsi
Copy link
Copy Markdown
Collaborator

@bazsi bazsi commented Feb 10, 2023

This PR improves 3 things to deliver more complete support for processing non-standard timestamps.

  1. type-hinting: improve the format we can use for DATETIME values by allowing usec granularity (instead of msec) and adding timezone offset information.

  2. date-parser now allows extracting timestamps into a name-value pair (in addition to storing the extracted time in the message timestamps)

  3. $(format-date) now uses the improved datetime format, so the timezone offset is properly handled when formatting the timestamp.

@github-actions
Copy link
Copy Markdown
Contributor

No news file has been detected. Please write one, if applicable.

bazsi added a commit to bazsi/syslog-ng that referenced this pull request Feb 11, 2023
Signed-off-by: Balazs Scheidler <bazsi77@gmail.com>
@bazsi bazsi force-pushed the date-parser-add-value-parameter branch from 031b2bd to 7517335 Compare February 11, 2023 06:53
bazsi added a commit to bazsi/syslog-ng that referenced this pull request Feb 11, 2023
Signed-off-by: Balazs Scheidler <bazsi77@gmail.com>
@bazsi bazsi force-pushed the date-parser-add-value-parameter branch from 7517335 to d9df183 Compare February 11, 2023 15:40
Comment thread lib/logmsg/type-hinting.c
Comment thread lib/logmsg/type-hinting.c Outdated
Signed-off-by: Balazs Scheidler <bazsi77@gmail.com>
The implementation is changed to allow for more granular timestamps
and eventually to also store a timezone value.

Signed-off-by: Balazs Scheidler <bazsi77@gmail.com>
Also add support for storing the timezone offset along with sec/usec.

Signed-off-by: Balazs Scheidler <bazsi77@gmail.com>
Signed-off-by: Balazs Scheidler <bazsi77@gmail.com>
This adds support for timezones. Unfortunetely strftime() does not support
fractions of a second, so that's not yet supported.

Signed-off-by: Balazs Scheidler <bazsi77@gmail.com>
Signed-off-by: Balazs Scheidler <bazsi77@gmail.com>
@bazsi bazsi force-pushed the date-parser-add-value-parameter branch from d9df183 to 122940e Compare February 13, 2023 19:06
@alltilla
Copy link
Copy Markdown
Collaborator

The macOS fail is not related to this PR, it fails on master, too.

@alltilla alltilla merged commit 13fd9e5 into syslog-ng:master Feb 14, 2023
Genfood pushed a commit to Genfood/syslog-ng that referenced this pull request Jun 14, 2023
Signed-off-by: Balazs Scheidler <bazsi77@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants