mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 00:07:26 +00:00
Services: Web Proxy: Access Log - syslog parsing cleanup. closes https://github.com/opnsense/core/issues/6588
This commit is contained in:
parent
962c388c58
commit
038d5b9bcf
@ -87,11 +87,11 @@ class SysLogFormatEpoch(NewBaseLogFormat):
|
||||
@staticmethod
|
||||
def match(line):
|
||||
# looks like an epoch
|
||||
return len(line) > 15 and line[0:10].isdigit() and line[10] == '.' and line[11:13].isdigit()
|
||||
return len(line) > 15 and line[0:10].isdigit() and line[10] == '.' and line[11:14].isdigit()
|
||||
|
||||
@property
|
||||
def timestamp(self):
|
||||
return datetime.datetime.fromtimestamp(float(self._line[0:13])).isoformat()
|
||||
return datetime.datetime.fromtimestamp(float(self._line[0:14])).isoformat(timespec='milliseconds')
|
||||
|
||||
@property
|
||||
def line(self):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user