Zip-file


Author
Message
sitob80
sitob80
New Member (27 reputation)New Member (27 reputation)New Member (27 reputation)New Member (27 reputation)New Member (27 reputation)New Member (27 reputation)New Member (27 reputation)New Member (27 reputation)New Member (27 reputation)
Group: Forum Members
Posts: 18, Visits: 105
Hi,

most of the time we receive some log files that are zipped from our customers and we want to analyze them. The approach today is to
extract all the files and then selective open the files the developer is interested in. Somehow I  imagine that we can write a plugin that allows us to open the zip file directly, analyze the files in it and provide the user a list of possible files where he can select which files he wan't to open in logviewplus. The tricky part is that we still wan't to have the file separated in the Log-Files&Filters view

So somehow I would need a way to open a log file(zip file) that results in multiple entries in the Log-Files &Filters view. 
Setting the FileName of the LogEntry class doesn't work for this. 

Best regards
LogViewPlus Support
LogViewPlus Support
Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)
Group: Moderators
Posts: 656, Visits: 2K
Hi Sitob,

Have you seen this video?
https://www.logviewplus.com/docs/open_zip_files.html

I think probably the best option is to use a custom command, but it is difficult to advise on specific configuration.

Thanks,

Toby
sitob80
sitob80
New Member (27 reputation)New Member (27 reputation)New Member (27 reputation)New Member (27 reputation)New Member (27 reputation)New Member (27 reputation)New Member (27 reputation)New Member (27 reputation)New Member (27 reputation)
Group: Forum Members
Posts: 18, Visits: 105
That may help but I wan't to open multiple files after the extraction of the zip file and the file names inside the zip will be different. Furthermore it would be nice if we could decompress the files in memory.
LogViewPlus Support
LogViewPlus Support
Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)
Group: Moderators
Posts: 656, Visits: 2K
The video shows extracting a zip file into a temp directory and then viewing all files in the directory.  A merge file is also created.  The log file names are not relevant to the process shown. 

I think the only difference is that you will need to randomise the extract directory name in case of filename conflicts if opening multiple zip files.

Please study the video and let me know if it does not make sense.

Thanks,

Toby
sitob80
sitob80
New Member (27 reputation)New Member (27 reputation)New Member (27 reputation)New Member (27 reputation)New Member (27 reputation)New Member (27 reputation)New Member (27 reputation)New Member (27 reputation)New Member (27 reputation)
Group: Forum Members
Posts: 18, Visits: 105
Thanks Toby, after a lot of testing this comes near to what I wanted to have.
The selection of the files to extract can be put in the external command. 
The only thing I don't get is how i could "randomise the extract directory"?
This isn't a problem in the external command but how would a setup a directory monitor workspace with different folders?


Thanks sitob80
LogViewPlus Support
LogViewPlus Support
Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)
Group: Moderators
Posts: 656, Visits: 2K
The important point here is that files with the same file name are not overridden on extract. If that's the case, then you can monitor the root directory and the Directory Monitor will be smart enough to only open the 'new' log files. Note that Directory Monitors automatically monitor child directories.

So your Directory Monitor can monitor:
%temp%\myextract\*.log

Zip 1 extracts to:
%temp%\myextract\first\a.log
%temp%\myextract\first\b.log

Later, zip 2 extracts to:
%temp%\myextract\second\a.log
%temp%\myextract\second\b.log
%temp%\myextract\second\c.log

At this point, LogVIewPlus will have 5 files open.

Hope that helps. Please let me know if you have any further questions or issues.

Toby
sitob80
sitob80
New Member (27 reputation)New Member (27 reputation)New Member (27 reputation)New Member (27 reputation)New Member (27 reputation)New Member (27 reputation)New Member (27 reputation)New Member (27 reputation)New Member (27 reputation)
Group: Forum Members
Posts: 18, Visits: 105
Hi Toby,

this helped a lot and this works that's correct. My problem currently is that I have to analyze around 10 zip files a day each containing at least 2 log with around 1.5 GB each. If I set it up the way you have proposed I would either have to clean up the directory multiple times a day or life with the fact that LogViewPlus greps all of my 64GB RAM Hehe

Somehow more complicated is the fact that i'm used to open a new instance of LogViewPlus for each server and therewith for each of the zip files. In this case your proposal about extracting a zip file and use the directory monitor doesn't fly at all.

Nevertheless thanks for your support in this topic and I've arranged with manual unzip and open actions in the meantime. I understand that my initial request was somehow special and that there won't be a solution from your side.

Thanks
 sitob80
LogViewPlus Support
LogViewPlus Support
Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)
Group: Moderators
Posts: 656, Visits: 2K
Thanks for the update Sitob.

We will add support for Zip files into LogViewPlus as I think this is actually a fairly common problem.  The existing workaround (described above) is too complicated. 

I will try and work this into the September release, but this may be difficult.  October may be more realistic.

Thanks Sitob!

Toby​​​​​​​​​


LogViewPlus Support
LogViewPlus Support
Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)Forum Expert (925 reputation)
Group: Moderators
Posts: 656, Visits: 2K
Zip file support was added in LogViewPlus v2.4.18.  Apologies for the delay in updating this thread.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Login

Explore
Messages
Mentions
Search