dansan/infolog-upload

Analyze infolog

dansan opened this issue · 4 comments

Minimal analysis is done during upload to link infolog to replay.

Further analysis code must be supplied by someone else. It would be called with the infolog text and available upload-info and would store its result into the DB (Django ORM is really simple to use) or return something like JSON and I'd store it.

Maybe resurrect https://github.com/spring/spring-infolog?

abma commented

infolog.txt parsing code is here:

https://github.com/spring/spring-infolog/blob/master/backend.py#L237

not sure how much of it is broken...

abma commented

ah, on the wishlist:

automaticly translate when uploaded:

http://stacktranslate.springrts.com/

also would be great if private data could be removed (paths often contain user/real names)

parser should be able to extract if game stored in infolog.txt contains:

  • game id
  • desync
  • crash
  • hangs (watchdog)
  • lua errors
  • shader errors

other stuff like hardware info / settings imo isn't that important, only useful / nice to have

Afaics all that analyzing is already coded in the above linked project. I will provide a class that someone else can fill with the code.

IMO the infolog should not be sanitized of paths etc, because those could be the source of problems too and are often important for communication with the user. Access will be limited to known game and engine devs and the uploading user. That is also what you expect from other software, when it wants to send reports home. I suggest that lobbies present the user with the content of the message, and ask the user to consent. (Copied from form discussion at https://springrts.com/phpbb/viewtopic.php?f=64&t=33266&start=0)

Please code away in analyzer1.py. You can actually make copies of it and code multiple classes inheriting from InfologAnalyzer, adding them at https://github.com/dansan/infolog-upload/blob/master/analyze_thread.py#L31 if you like.

I have intentionally removed all traces of Django and it ORM from the analyzer files, so you don't have to deal with it. That also means, that you don't have access to the DB. So if you wish for anything to be saved in not-yet-existing DB columns, just tell me what and I'll create the DB stuff and the interface to the analyzer. In that spirit upload_json() has an extensions argument, but the data is not yet saved, as I have no idea of the requirements.