Skip to content

Commit

Permalink
Refactor log arrival time method
Browse files Browse the repository at this point in the history
  • Loading branch information
ppcad committed Dec 5, 2024
1 parent 1bd89e2 commit 63c6266
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions logprep/abc/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,12 +317,9 @@ def _add_env_enrichment_to_event(self, event: dict):
add_fields_to(event, fields)

def _add_arrival_time_information_to_event(self, event: dict):
new_field = {
self._config.preprocessing.get("log_arrival_time_target_field"): TimeParser.now(
self._log_arrival_timestamp_timezone
).isoformat()
}
add_fields_to(event, new_field)
target = self._config.preprocessing.get("log_arrival_time_target_field")
time = TimeParser.now(self._log_arrival_timestamp_timezone).isoformat()
add_fields_to(event, {target: time})

def _add_arrival_timedelta_information_to_event(self, event: dict):
log_arrival_timedelta_config = self._config.preprocessing.get("log_arrival_timedelta")
Expand Down

0 comments on commit 63c6266

Please sign in to comment.