Skip to content

Commit

Permalink
Chronological order
Browse files Browse the repository at this point in the history
  • Loading branch information
ties committed Dec 11, 2023
1 parent ad9bd1c commit d8697f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
INFO:f3896.eventlog:2023-12-09T19:46:45+00:00 [notice]: US profile assignment change. US Chan ID: 27; Previous Profile: 10 13; New Profile: 11 13.;CM-MAC=44:05:de:ad:be:ef;CMTS-MAC=00:01:de:ad:be:ef;CM-QOS=1.1;CM-VER=3.1;
INFO:f3896.eventlog:2023-12-09T18:36:26+00:00 [notice]: US profile assignment change. US Chan ID: 27; Previous Profile: 9 13; New Profile: 10 13.;CM-MAC=44:05:de:ad:be:ef;CMTS-MAC=00:01:de:ad:be:ef;CM-QOS=1.1;CM-VER=3.1;
```
* Log these messages in chronological order (newest last)
2 changes: 1 addition & 1 deletion sagemcom_f3896_client/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ async def __log_based_metrics(self, registry: CollectorRegistry) -> None:
# print the new log message
current_messages = set(log_lines)
new_messages = current_messages - self.previous_logs
for msg in sorted(new_messages, reverse=True):
for msg in sorted(new_messages):
MODEM_LOG.info(
"%s [%s]: %s", msg.time.isoformat(), msg.priority, msg.message
)
Expand Down

0 comments on commit d8697f4

Please sign in to comment.