[linux] Factorio logparser

Find multiplayer games.
Tools/scripts to run a dedicated server.
Post Reply
Bisa
Filter Inserter
Filter Inserter
Posts: 450
Joined: Fri Jul 17, 2015 3:22 pm
Contact:

[linux] Factorio logparser

Post 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
Last edited by Bisa on Mon Nov 23, 2015 10:05 pm, edited 2 times in total.
Hosting a factorio server? Take a look at this || init script ||.

Bisa
Filter Inserter
Filter Inserter
Posts: 450
Joined: Fri Jul 17, 2015 3:22 pm
Contact:

Re: [linux] Factorio logparser

Post by Bisa »

*reserved*
Hosting a factorio server? Take a look at this || init script ||.

Bisa
Filter Inserter
Filter Inserter
Posts: 450
Joined: Fri Jul 17, 2015 3:22 pm
Contact:

Re: [linux] Factorio logparser

Post 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.
Last edited by Bisa on Sun Oct 11, 2015 8:06 am, edited 1 time in total.
Hosting a factorio server? Take a look at this || init script ||.

Fansana
Inserter
Inserter
Posts: 26
Joined: Tue Jun 02, 2015 3:18 pm
Contact:

Re: [linux] Factorio logparser

Post 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.

Bisa
Filter Inserter
Filter Inserter
Posts: 450
Joined: Fri Jul 17, 2015 3:22 pm
Contact:

Re: [linux] Factorio logparser

Post 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 :)
Hosting a factorio server? Take a look at this || init script ||.

Bisa
Filter Inserter
Filter Inserter
Posts: 450
Joined: Fri Jul 17, 2015 3:22 pm
Contact:

Re: [linux] Factorio logparser

Post 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
Hosting a factorio server? Take a look at this || init script ||.

McBirdy
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Mar 14, 2016 3:32 pm
Contact:

Re: [linux] Factorio logparser

Post 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?

Bisa
Filter Inserter
Filter Inserter
Posts: 450
Joined: Fri Jul 17, 2015 3:22 pm
Contact:

Re: [linux] Factorio logparser

Post 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
Hosting a factorio server? Take a look at this || init script ||.

Post Reply

Return to “Multiplayer / Dedicated Server”