Page 1 of 1
Add join/leave/... actions in game chat output
Posted: Tue Aug 09, 2016 1:25 am
by mickael9
Currently, the game will issue lines on the standard output such as :
It would be nice if other game-related actions were also added to the same ouptput, eg:
Code: Select all
[JOIN] mickael9 joined the game
[CHAT] mickael9: hello
[KICK] baduy was kicked by mickael
[DEATH] mickael9 died
[LEAVE] mickael9 left the game
Of course, the format is only a suggestion but having different tags for different actions makes the output easily parsable by an external program.
Re: Add join/leave/... actions in game chat output
Posted: Sat Aug 27, 2016 3:10 pm
by mickael9
Please consider this, at least for the join/leave part, especially since the username info doesn't appear in the server logs anymore in 0.14
Re: Add join/leave/... actions in game chat output
Posted: Mon Sep 12, 2016 2:23 am
by Bisa
joining in chorus - while polling the /players command is possible it would still be nice to know exactly who and when someone joined based on the logs
Re: Add join/leave/... actions in game chat output
Posted: Sun Dec 11, 2016 8:50 pm
by zopieux
Any update on this? Many community projects would rely on this feature if it was there!
Re: Add join/leave/... actions in game chat output
Posted: Sun Dec 11, 2016 8:52 pm
by Rseding91
But why? There's already the pause, the download bar on the top left, and the huge log file output when someone joins a game.
Re: Add join/leave/... actions in game chat output
Posted: Sun Dec 11, 2016 9:34 pm
by mickael9
You can't infer from the logs, say, that "mickael9 joined the game" because the user name of the connecting player doesn't appear in them.
This used to be possible before the MP rewrite. All we need is a log line like "mickael9 connected with peer id 1" (anything works as long as it's parseable).
Polling the /players commands would work for that purpose but you couldn't reliably associate it to a peer id to detect other actions than join/leave if multiple players join between two polls
Nothing appears in the server log when a player dies (verbose mode enabled).
Kick appears as a disconnect in the log, no info on who issued the kick (or whether it's a kick and not a disconnect).
Readable output of those events (as described in my original post) could also be useful to, say, an admin running the game in a screen/tmux session to follow what is going on in the server
It would also be useful in logs as well (to audit a player's actions for instance), and by the way, chat output is written to stdout but not in the logs, I believe this should be logged too.
To sum it up, log contains basically nothing "useful" apart from "someone joined/left the game"
Standard output adds chat/commad output (that IMHO ought to be logged), and that's it
Re: Add join/leave/... actions in game chat output
Posted: Thu Mar 23, 2017 7:29 pm
by mickael9
I'd also like to mention that having the chat output in log is more important that I anticipated because currently there is NO way to record it from the Windows build because its standard output is attached to the console and can't be redirected or piped.
Eg, if you run "Factorio.exe --start-server map.zip 2>nul >nul <nul" the output still shows up (and you can still interact with it).
You also can't even log the chat by doing ">logfile.txt" or have an external program read it. Basically you have a "view only" chat log.
How hard can it be to just write the chat in the log file (possibly with an option to do so) ?
Re: Add join/leave/... actions in game chat output
Posted: Tue Apr 04, 2017 1:04 pm
by Bisa
mickael9 wrote:How hard can it be to just write the chat in the log file (possibly with an option to do so) ?
doubt it's a question of "difficulty", I suspect it's more of a priority thing - there's probably more stuff going on that are more important than this - bump nonetheless
Re: Add join/leave/... actions in game chat output
Posted: Tue Apr 04, 2017 4:16 pm
by Oxyd
OK, I added [JOIN] and [LEAVE], and I added an option to log these types of messages – those that don't go to the main log – to a separate log file for your server automation pleasures.
Re: Add join/leave/... actions in game chat output
Posted: Wed Apr 05, 2017 10:43 am
by Bisa
cool, thnx m8
Re: Add join/leave/... actions in game chat output
Posted: Mon Apr 10, 2017 8:47 am
by redlabel
Oxyd wrote:OK, I added [JOIN] and [LEAVE], and I added an option to log these types of messages – those that don't go to the main log – to a separate log file for your server automation pleasures.
Would it also be possible to have an option (perhaps advanced F4 options?) to view timestamps in chat messages?
Re: Add join/leave/... actions in game chat output
Posted: Mon Apr 10, 2017 10:56 am
by ssilk
Re: Add join/leave/... actions in game chat output
Posted: Mon Apr 10, 2017 7:29 pm
by noliVe
Oxyd wrote:OK, I added [JOIN] and [LEAVE], and I added an option to log these types of messages – those that don't go to the main log – to a separate log file for your server automation pleasures.
LOVE YOU MAN!!!
Re: Add join/leave/... actions in game chat output
Posted: Mon Apr 24, 2017 11:51 pm
by mickael9
I see JOIN, LEAVE, KICK, BAN, COMMAND and WARNING have been implemented in 0.15, thanks a lot!
Are there any others? The only thing missing would be a DEATH action then this would be perfect!
I also didn't see any way for mods to write stuff to the new console log, this would be a nice addition.
Re: Add join/leave/... actions in game chat output
Posted: Tue Apr 25, 2017 6:27 pm
by ssilk
All changes are in the Changelog. That is the reference.
Re: Add join/leave/... actions in game chat output
Posted: Tue Apr 25, 2017 6:57 pm
by mickael9
You're right, only JOIN and LEAVE were added, it looks like KICK, BAN, COMMAND and WARNING already exist in 0.14.23 (I wonder when those were first added)
Re: Add join/leave/... actions in game chat output
Posted: Tue Apr 25, 2017 8:48 pm
by ssilk
Version: 0.13.0
Date: 27. 06. 2016.
...
- Added /ban /kick /bans /admins and /admin commands.
And there is a help command:
Version: 0.14.13
Date: 05. 10. 2016
...
- Added tab-complete parameters logic to the commands: config, color, and help.....