You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if want to parse gz log file, the parser has some bugs.
Exactly, the function parser_file() in parser/type.py,
To sove this problem
loglines = reversed(logfile.readlines())
===> loglines = reversed([x.decode('utf-8') for x in logfile.readlines()])
Because, in the original loglines is a list of bytes. python regular expression(re) can parse only strings.
So, the above solution i convert bytes list to strings list .
enjoy this project code and have a nice day :)
Specifications
Command tried:
logdissect version:
Python version:
Operating system:
Operating system version:
Log file type:
Other info that might be useful:
The text was updated successfully, but these errors were encountered:
Bug and solution
if want to parse gz log file, the parser has some bugs.
Exactly, the function parser_file() in parser/type.py,
To sove this problem
loglines = reversed(logfile.readlines())
===> loglines = reversed([x.decode('utf-8') for x in logfile.readlines()])
Because, in the original loglines is a list of bytes. python regular expression(re) can parse only strings.
So, the above solution i convert bytes list to strings list .
enjoy this project code and have a nice day :)
Specifications
The text was updated successfully, but these errors were encountered: