[2.0.72] headless server --console-log problems

Bugs that we were not able to reproduce, and/or are waiting for more detailed info.
ctalkep_
Inserter
Inserter
Posts: 21
Joined: Thu Feb 06, 2020 8:00 am
Contact:

[2.0.72] headless server --console-log problems

Post by ctalkep_ »

the console log will incorrectly report player joins/leaves
-cancelling server join mid-map-download will make a [LEAVE] despite not being connected yet
-leaving the game by killing factorio from task manager will not make a [LEAVE], making it seem as the player never left

Code: Select all

=== Log opened 2025-11-09 20:04:36 ===
2025-11-09 20:05:08 [JOIN] CTALKEP_ joined the game
2025-11-09 20:05:25 [CHAT] CTALKEP_: leaving normally now, next up is joining with incorrect mods
2025-11-09 20:05:27 [LEAVE] CTALKEP_ left the game
2025-11-09 20:07:09 [JOIN] CTALKEP_ joined the game
2025-11-09 20:07:59 [CHAT] CTALKEP_: leaving normally now, next up is attempting to join but cancelling mid-map-download
2025-11-09 20:08:02 [LEAVE] CTALKEP_ left the game
2025-11-09 20:08:04 [LEAVE] CTALKEP_ left the game
2025-11-09 20:08:05 [LEAVE] CTALKEP_ left the game
2025-11-09 20:08:07 [LEAVE] CTALKEP_ left the game
2025-11-09 20:08:09 [JOIN] CTALKEP_ joined the game
2025-11-09 20:08:24 [CHAT] CTALKEP_: now leaving by killing factorio from task manager
2025-11-09 20:09:42 [JOIN] CTALKEP_ joined the game
2025-11-09 20:10:24 [CHAT] CTALKEP_: now leaving via alt f4
2025-11-09 20:10:25 [LEAVE] CTALKEP_ left the game
=== Log closed 2025-11-09 20:10:39 ===
I'm unsure what the "intended" usage for --console-log is, but this makes it useless for generating playercount graphs, which I wanted to use it for
lua on_player_joined_game and on_player_left_game do not make these errors, so a scenario/mod to log them to a file properly seems pretty easy to do if this is considered a low priority / non-issue
also slightly related: I could not figure out a way to print to the console log from lua - game.print() sends to chat and print() sends to the console, but neither shows up in the console-log
Attachments
control.lua
(395 Bytes) Downloaded 120 times
server_factorio-current.log
(22.86 KiB) Downloaded 118 times
console_log.txt
(958 Bytes) Downloaded 94 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 17563
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.72] headless server --console-log problems

Post by Rseding91 »

I also do not know what the intended use for --console-log is. I'd be open to suggestions for changes but as it stands and given the current issue you mentioned I'm not sure if anyone's using it as is.
If you want to get ahold of me I'm almost always on Discord.
eugenekay
Smart Inserter
Smart Inserter
Posts: 1335
Joined: Tue May 15, 2018 2:14 am
Contact:

Re: [2.0.72] headless server --console-log problems

Post by eugenekay »

ctalkep_ wrote: Sun Nov 09, 2025 7:59 pm the console log will incorrectly report player joins/leaves
-cancelling server join mid-map-download will make a [LEAVE] despite not being connected yet
-leaving the game by killing factorio from task manager will not make a [LEAVE], making it seem as the player never left

From my experience inspecting the network stack, LEAVE messages are only generated on the Server side when it receives a properly-formatted client Disconnect sequence (but not one which has been Replayed on the network). Alt-F4 does not immediately terminate the running application; it rather invokes the “close window” handler which then performs a Leave Game normally. Issuing a Terminate Provess from Task Manager (or kill -9 on Linux) does not run the shutdown logic.
Post Reply

Return to “Pending”