Teach "open a file" to read archived logs

Teach "open a file" to read archived logs

Postby oscarucb2 » Mon Jul 09, 2012 11:10 am

Hi - I'm a long time user of WoL. Love the site but I've always been very annoyed by a missing feature in the client. It's very good about splitting and zipping and archiving logs, but it really needs a feature to read a zipped log file back in. Please please please add a feature to open a zip file and parse the log file within. I know the library support exists in Java, this should be a very easy feature to implement..

It's especially annoying when you want to upload a large log file (eg if you let it run for a raid week without uploading), because the Open File refuses to read a log file longer than a week without splitting, so you split it and then end up with a bunch of zip files that you have to manually unzip before you can upload them. Alot of extra disk churn and user frustration for no reason. Plus from a user interface design perspective, it's kind of ridiculous for a program to output a file format for "archiving" that it then refuses to read it back in.
oscarucb2
 
Posts: 8
Joined: Thu Nov 19, 2009 4:14 pm

Re: Teach "open a file" to read archived logs

Postby Maihem » Thu Aug 30, 2012 3:15 pm

Added this to our feature requests; it does make sense to implement. Can't promise anything on a timeline, however, as we're fairly busy right now. Especially so with the recent patch.
Maihem
Site Admin
 
Posts: 2749
Joined: Sun Apr 05, 2009 4:14 pm

Re: Teach "open a file" to read archived logs

Postby oscarucb2 » Wed Apr 03, 2013 11:02 am

Still really really wanting this feature..

These days the client often runs out of memory and gets "stuck" parsing more than a couple nights of raid, so often end up having to split before uploading. Really want the client to read those post-split archives directly rather than forcing me to manually unzip them again.
oscarucb2
 
Posts: 8
Joined: Thu Nov 19, 2009 4:14 pm

Re: Teach "open a file" to read archived logs

Postby Maihem » Wed Jun 12, 2013 4:57 pm

I've just looked at this, but sadly it's not that easy to implement. With how the client is written, we need the combat log to be an actual file, not a ZIP entry. This means we'd need to extract it before parsing. I could allocate a temp file, extract to it, then parse, but due to how we handle error states I can't guarantee that these temp files are deleted when the client crashes. Will think on the issue a bit more.

Remind me in a week or so :)
Maihem
Site Admin
 
Posts: 2749
Joined: Sun Apr 05, 2009 4:14 pm

Re: Teach "open a file" to read archived logs

Postby oscarucb2 » Thu Jun 13, 2013 1:53 pm

Hi and thanks for looking into this possible feature upgrade. As noted in my previous posts this is something I've desperately wanted for a long time.

I obviously know nothing about the internal architecture of your client. However based on my knowledge of Java, shouldn't it just be as easy as instantiating java.util.zip.ZipInputStream, casting it to a java.io.FilterInputStream, and then passing it to the code that reads file data? (ie allowing the "unzipping" to happen transparently and on-the-fly inside the abstraction) If necessary you could even wrap that in a PushbackInputStream or BufferedInputStream as required. The only reason I can think of this approach might fail is if your file reading code uses java.nio or something freakier.

I guess if somehow that approach won't work, then using a temporary file created using java.io.File.createTempFile() would be almost as good - slightly less efficient that on-the-fly decompression, but still MUCH faster and better than forcing the user to do this process manually. I think the JRE does a pretty good job of cleaning up those temp files even if your app crashes with a fatal exception, and at worst it's easy to reap the temp next time the user cleans his temp directory. In any case the temp file is far more likely to be automatically reclaimed by Java than when I have to unzip manually and then forget to go manually delete the manually-created temp files when I'm done.
oscarucb2
 
Posts: 8
Joined: Thu Nov 19, 2009 4:14 pm

Re: Teach "open a file" to read archived logs

Postby Maihem » Fri Jun 14, 2013 2:14 pm

It would be that easy if we exclusively used the stream-based I/O APIs. However, the client uses java.nio internally in the current implementation.

I had looked into File.createTempFile(), but this doesn't get removed when the VM exits abnormally, e.g. when an exception is thrown. I'm thinking of using a temp file in a static location that gets removed any time the client starts (in case it hasn't been removed after it was last created).
Maihem
Site Admin
 
Posts: 2749
Joined: Sun Apr 05, 2009 4:14 pm

Re: Teach "open a file" to read archived logs

Postby oscarucb2 » Fri Jun 14, 2013 10:43 pm

Maihem wrote:It would be that easy if we exclusively used the stream-based I/O APIs. However, the client uses java.nio internally in the current implementation.


Ok, that makes sense.

Maihem wrote:I had looked into File.createTempFile(), but this doesn't get removed when the VM exits abnormally, e.g. when an exception is thrown. I'm thinking of using a temp file in a static location that gets removed any time the client starts (in case it hasn't been removed after it was last created).


Either option would be a vast improvement over the current behavior. And of course users are still free to continue managing their own decompression manually if they're really worried about the small chance of a leaked temp file. ;)
oscarucb2
 
Posts: 8
Joined: Thu Nov 19, 2009 4:14 pm

Re: Teach "open a file" to read archived logs

Postby StevieTV » Sat Jan 11, 2014 3:29 pm

I know this is an old post, but I'd love to see this option! Couldn't the program just always extract to the same temp file name so that is was always overwritten? Or set a flag so the program knows its uploading from a zip and ask if user wants to delete temp file upon upload as per the asking if it wants to split and zip?
StevieTV
 
Posts: 2
Joined: Sat Mar 13, 2010 1:11 pm

Re: Teach "open a file" to read archived logs

Postby riham » Fri Nov 14, 2014 2:25 pm

I would also love for this to be updated. At first I thought the bosses were sorted by killed or not but that does not seem to be the case. (not really sure how they are sorted right now.) It would also be great if this supported jsonp.
riham
 
Posts: 1
Joined: Fri Nov 14, 2014 2:24 pm


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 2 guests

cron