Skip to content

Commit

Permalink
Fix timestamp differ rule doc (#723)
Browse files Browse the repository at this point in the history
* fix rule doc import path
* add CHANGELOG.md entry
  • Loading branch information
dtrai2 authored Dec 9, 2024
1 parent ccad610 commit 239cb21
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ the list is now fixed inside the packaged logprep
* allow `TimeParser` to get the current time with a specified timezone instead of always using local time and setting the timezone to UTC
* remove `tldextract` dependency
* remove `urlextract` dependency
* fix wrong documentation for `timestamp_differ`

### Bugfix

Expand Down
10 changes: 4 additions & 6 deletions logprep/processor/timestamp_differ/rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
Rule Configuration
^^^^^^^^^^^^^^^^^^
The timestamp format can be specified per timestamp. Following patterns can be used to define the
timestamp format:
`Timestamp tokens <https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes>`_.
The timestamp format can be specified per timestamp.
A speaking example:
Expand All @@ -31,7 +29,7 @@
{"ingest": "2022-12-06 10:00:00", "processed": "2022-12-06 10:00:05", "processing_time": "5.0"}
.. autoclass:: logprep.processor.timestamper.rule.TimestamperRule.Config
.. autoclass:: logprep.processor.timestamp_differ.rule.TimestampDifferRule.Config
:members:
:undoc-members:
:inherited-members:
Expand Down Expand Up @@ -69,8 +67,8 @@ class Config(FieldManagerRule.Config):
and the timestamp format can be specified in the form of:
:code:`${dotted.field.path:timestamp-format}`. If no timestamp format is given, e.g.
:code:`${dotted.field.path}`, the string will be assumed as an iso8601 compliant string and
parsed. For more information on the format syntax see
`datetime strftime/strptime <https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes>`_."""
parsed. For more information on the format syntax see `datetime strftime/strptime
<https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes>`_."""
source_fields: list = field(factory=list)
source_field_formats: list = field(factory=list)
output_format: str = field(
Expand Down

0 comments on commit 239cb21

Please sign in to comment.