Page 1 of 1

[linux] Factorio logparser

Posted: Sun Aug 09, 2015 5:11 pm
by Bisa
Inspired by Ikanreed I've created a log parser for Factorio: https://github.com/Bisa/factorio-logparser
This will monitor your factorio log and output peer information in json-format on disk for your creative needs.

(sadly Ikanreed did not respond to any queries regarding his licensing so I decided to write my own)
Please feel free to share and contribute - it's released under the MIT license

I feel obliged to add that this is my first ever python script, I've since come to understand that static methods is a no-no and I should probably have done this in another way - let's aim for v2.0 ;)

----------- EDIT:
To *anyone*: if you found this script useful, please consider looking at my suggestion for adding this to the factorio binary itself:
https://forums.factorio.com/forum/vie ... =6&t=17980

Re: [linux] Factorio logparser

Posted: Sun Aug 09, 2015 5:11 pm
by Bisa
*reserved*

Re: [linux] Factorio logparser

Posted: Fri Aug 14, 2015 4:44 am
by Bisa
Been doing some cleanup and "pythonification", presenting to you version v0.1.0 which is now running on my public server - I have yet to build a app that uses the json file, for now I'm simply reading it from disk whenever I want to have a look at current state of affairs.

Re: [linux] Factorio logparser

Posted: Fri Oct 09, 2015 4:59 am
by Fansana
Hey I really like your idea and might use your script.
Right now I am working on a Launcher for Factorio.
With Gui, obviously. I am trying to make a full on wrapper for Factorio where you can just click a server and join, or simply add/remove Mods or Modpacks.
Is it ok with you that I use this for my Project?
This will be very helpful even If I have to rewrite it into Java.

Re: [linux] Factorio logparser

Posted: Sun Oct 11, 2015 8:04 am
by Bisa
Fansana wrote:Hey I really like your idea and might use your script.
Right now I am working on a Launcher for Factorio.
With Gui, obviously. I am trying to make a full on wrapper for Factorio where you can just click a server and join, or simply add/remove Mods or Modpacks.
Is it ok with you that I use this for my Project?
This will be very helpful even If I have to rewrite it into Java.
It's open source - use it according to the license :)

Re: [linux] Factorio logparser

Posted: Mon Nov 23, 2015 10:04 pm
by Bisa
To *anyone*: if you found this script useful, please consider looking at my suggestion for adding this to the factorio binary itself:
https://forums.factorio.com/forum/vie ... =6&t=17980

Re: [linux] Factorio logparser

Posted: Mon Mar 14, 2016 3:56 pm
by McBirdy
Great script. I just installed it on my server, the default log file is so cluttered I was having difficulties reading anything out of it.

Do you know when the game moves the factorio-current.log over to become factorio-previous.log?

Re: [linux] Factorio logparser

Posted: Mon Mar 14, 2016 9:13 pm
by Bisa
McBirdy wrote:Great script
thnx ;)
McBirdy wrote: Do you know when the game moves the factorio-current.log over to become factorio-previous.log?
When the server either stops or starts (I presume its when it starts) hence if you want to retain the logs you should probably make a scripted task to rename/archive the factorio-previous.log before you start a server