otros-systems / otroslogviewer

Log viewer focused on developers work
Apache License 2.0
424 stars 86 forks source link

Unable to parse zip #608

Closed DavidAccola closed 2 years ago

DavidAccola commented 2 years ago

OtrosLogViewer can parse a .log without issue, but when I zip the same file, it cannot parse the .zip.

Attaching example files. testing.log testing.zip

Rep steps: Select testing.log > "Can parse testing.log" Select testing.zip > "Can't parse testing.zip"

nuessgens commented 2 years ago

I'm not sure if OTROS has zip file support. All I know is that .gz is explicitly implemented.

The complete FS handling relies on apache commons vfs.

So one is able to open a zip file by specifing a zip uri.

I was able to open your testing.zip by using the URI zip:file:///tmp/testing.zip!/testing.log

What would be the desired behavior? Without looking into detail (/knowing the effort) would it be sufficient for the file-chooser dialog to "treat" zip-files as folders (like windows-explorer does)

Or should we open the zip-file as log in case it just contains one log?

DavidAccola commented 2 years ago

@nuessgens This is what I found in the documentation as far as expected behavior: https://github.com/otros-systems/otroslogviewer/wiki/OpeningLogs#open-compressed-archives

"If one log file is compressed in a zip... archive you can open the file with the 'open' button or per double click."

"If you have compressed more than one log files or mixed with other files you can explore the archive by putting the type at the beginning of the location text field. Ex: .zip:file:///C:/moreThanONeLogFile.zip!/"

So from that I'd say on double click/open, open the zip as log is how it's expected to work at present (in this case, since there's only one .log file zipped).

But I do think treating zips as folders would be the most seamless behavior.

svennissel commented 2 years ago

This is a documentation issue (Joke for me and @nuessgens :-) ).

@nuessgens is right, but i fixed this and implement opening zipped logfiles. Please Try this: https://drive.google.com/file/d/1TgKUIEVCDurDASL35JK9YNflBAIg9HZu/view?usp=sharing

DavidAccola commented 2 years ago

Tested olv-1.4.17-RC1 and it looks great! Thanks @svennissel.