Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 6 commits into from Feb 14, 2023

Conversation

bazsi
Copy link
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
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
lib/logmsg/type-hinting.c Show resolved Hide resolved
lib/logmsg/type-hinting.c Outdated Show resolved Hide resolved
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
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.

None yet

2 participants