Noticed by this failing unit test:
FAIL: test_parse_messages (test_log_read.LogReadTester)
Try parsing first 100 lines of messages if running on linux
----------------------------------------------------------------------
Traceback (most recent call last):
File "pyi2ncommon/test/test_log_read.py", line 268, in test_parse_messages
self.assertIsNotNone(data, f"Failed to parse {parser.last_unparsed_line}")
AssertionError: unexpectedly None : Failed to parse Nov 7 09:24:31 storm kernel: Linux version 6.0.5-200.fc36.x86_64 (mockbuild@bkernel02.iad2.fedoraproject.org) (gcc (GCC) 12.2.1
20220819 (Red Hat 12.2.1-2), GNU ld version 2.37-36.fc36) #1 SMP PREEMPT_DYNAMIC Wed Oct 26 15:55:21 UTC 2022
# pattern for linux system logs (usually "messages" or "syslog" also "maillog"
SYS_LOG_PATTERN = \
- r'\s*(?P<timestamp>\w{3} +\d{2} \d{2}:\d{2}:\d{2}) (?P<hostname>\S+) ' \
+ r'\s*(?P<timestamp>\w{3} +\d{1,2} \d{2}:\d{2}:\d{2}) (?P<hostname>\S+) ' \
+ r'(?P<procname>[^\[\]:]+)(?:\[(?P<pid>\d+)\])?: (?P<message>.*)'