Skip to content

Commit

Permalink
Fix appending of following_lines to prev_message if next message is l…
Browse files Browse the repository at this point in the history
…og IMPORTANT
  • Loading branch information
MBARIMike committed May 6, 2024
1 parent e11326d commit 357fc78
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion stoqs/loaders/SampleLoaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,9 @@ def _read_syslog(self, url, levels=('IMPORTANT',), components=('ESPComponent',))
if lm.groupdict().get('log_component') in ('ESPComponent',) and lm.groupdict().get('log_level') in levels:
# December 2022 while adding Sipper capture: Not sure why there is this prev_line logic...
if prev_line_has_component:
log_rows.append({'unixTime': float(prev_esec) * 1000, 'text': prev_message})
# With https://dods.mbari.org/opendap/data/lrauv/brizo/missionlogs/2024/20240426_20240503/20240427T153211/syslog
# added appending of following_lines, should be innocuous if this is the wrong logic
log_rows.append({'unixTime': float(prev_esec) * 1000, 'text': prev_message + '\n' + following_lines})

prev_esec = lm.groupdict().get('log_esec')
prev_message = lm.groupdict().get('log_message')
Expand Down

0 comments on commit 357fc78

Please sign in to comment.