Page 1 of 1

[Rseding91] Server log inconsistency

Posted: Thu Jun 29, 2017 6:54 pm
by badgamernl
Hello Factorio forum readers,

Do you host Factorio servers and like to parse the logs? Well you have prob stumbled upon some weird things like the inconsistency of the log.

On the server we are using a rank / tag system, that is why some lines have [Owner] after the player name. This is something that adds inconsistency because its not in all lines and its not needed.
How it could be done
( Leave a reply if you have anything that should change )
chat messages:
now:
2017-06-29 15:23:58 [CHAT] BADgamerNL [Owner]: message
How it should be:
2017-06-29 15:23:58 [CHAT] BADgamerNL: message

Commands:
now:
2017-06-23 12:15:15 [COMMAND] BADgamerNL [Owner] (command): game.forces["enemy"].kill_all_units()
2017-05-27 10:59:35 [COMMAND] VaareLp [Guest] tried to run a command, which isn't allowed for them: game.speed = 100
2017-06-23 12:14:28 [WARNING] Player BADgamerNL [Owner] tried using a command "game.forces["enemy"].kill_all_units()"
2017-06-23 12:14:28 [WARNING] Using Lua console commands will disable achievements, please repeat the command to proceed.
How it should be:
2017-06-23 12:15:15 [COMMAND] BADgamerNL: game.forces["enemy"].kill_all_units()
2017-05-27 10:59:35 [COMMAND] VaareLp tried to run a command, which isn't allowed for them: game.speed = 100
2017-06-23 12:14:28 [WARNING] BADgamerNL tried using a command "game.forces["enemy"].kill_all_units()"
2017-06-23 12:14:28 [WARNING] Using Lua console commands will disable achievements, please repeat the command to proceed.
Ban & Unban:
now:
2017-06-29 17:36:34 [BAN] test (not on map) was banned by BADgamerNL [Owner]. Reason: testy test.
unban no log line
How it should be:
2017-06-29 17:36:34 [BAN] test was banned by BADgamerNL. Reason: testy test.
2017-06-29 17:36:34 [UNBAN] test was unbanned by BADgamerNL.
OR
2017-06-29 17:36:34 [BAN] test was banned. By: BADgamerNL. Reason: testy test.
2017-06-29 17:36:34 [UNBAN] test was unbanned. By: BADgamerNL
shout messages:
now:
2017-06-29 17:19:43 BADgamerNL [Owner] (shout): test
How it should be:
2017-06-29 17:19:43 [SHOUT] BADgamerNL: test

Re: Server log inconsistency

Posted: Thu Jun 29, 2017 7:30 pm
by TruePikachu
Not a bug, the tags are almost certainly implemented by changing the player's name via writing to LuaPlayer::name; tags aren't a part of vanilla Factorio.

Re: Server log inconsistency

Posted: Thu Jun 29, 2017 7:36 pm
by badgamernl
TruePikachu wrote:Not a bug, the tags are almost certainly implemented by changing the player's name via writing to LuaPlayer::name; tags aren't a part of vanilla Factorio.
They are part of vanilla Factorio
http://lua-api.factorio.com/0.15.25/Lua ... Player.tag

Re: Server log inconsistency

Posted: Thu Jun 29, 2017 8:30 pm
by TruePikachu
Hm, TIL.

Re: Server log inconsistency

Posted: Fri Jun 30, 2017 1:31 pm
by Oxyd
The point of tags is to appear after the username, which, by your own admission, is precisely what's happening here. I don't see the bug.

Re: Server log inconsistency

Posted: Sat Jul 01, 2017 12:07 am
by badgamernl
Oxyd wrote:The point of tags is to appear after the username, which, by your own admission, is precisely what's happening here. I don't see the bug.
The problem is that its not in all log lines. It's oke if its in all log lines or none at all. But why would you need to have the tag in a log line? You prob have a DB with the ranks of the players and it will just add inconsistency if the server doesn't use the softmod / scenario.

Re: Server log inconsistency

Posted: Mon Jul 03, 2017 4:07 pm
by Oxyd
Which log line is it not in? Your first post seems to indicate it's in all of them. Assuming “now” is the behaviour you're observing.
badgamernl wrote:You prob have a DB with the ranks of the players and it will just add inconsistency if the server doesn't use the softmod / scenario.
I have no idea what that means.

[0.15.36] No UNBAN in log file

Posted: Thu Oct 12, 2017 7:37 am
by badgamernl
Hello,

There is still no unban in the log file, only a ban.

You guys put my post in Not a bug but it really is a bug even if some of the things in it related to the log file aren't a bug in your eyes. Demote is in it then unban should be too.
viewtopic.php?f=23&t=50354

Code: Select all

2017-09-24 17:52:33 [BAN] ander277 was banned by FlipHalfling90 [Mod]. Reason: Griefing -24/09/2017- flip.
???

Code: Select all

2017-09-24 13:18:01 [PROMOTE] killerbbeast was promoted to admin by rezz [Mod].
2017-09-22 18:42:15 [DEMOTE] vforvodka was demoted from admin by <server>.

Re: [0.15.36] No UNBAN in log file

Posted: Thu Oct 12, 2017 8:32 am
by Bilka
badgamernl wrote:You guys put my post in Not a bug but it really is a bug even if some of the things in it related to the log file aren't a bug in your eyes. Demote is in it then unban should be too.
viewtopic.php?f=23&t=50354
First off all: A log tag showing/not showing inconsistency has nothing to do with what you are reporting here. Second of all: You talked about inconsistency with the tag in the log file being shown/not shown. But all examples you posted showed the tags. You didn't answer Oxyd after he asked which lines did not have them. So, from the perspective of the devs, you reported a bug, but can't provide evidence/examples of it.

Re: [0.15.36] No UNBAN in log file

Posted: Thu Oct 12, 2017 9:18 am
by badgamernl
This is not what this Bug post is about but here you have some info on it:

Totally not true, the examples I gave showed the log lines with problems. they either did not have a tag or they did have one (inconsistent). If you really want me too I can give you a log and you can try to parse it with a minimal amount of code. It's not easy to do when half of the log is inconsistent (the examples I showed). If you have read the post, you should be able to get out that the solution would be to not show player tag in the log file.
First off all: A log tag showing/not showing inconsistency has nothing to do with what you are reporting here.
The Post was about log inconsistency in general even if 75% of it was about player tags.
Second of all: You talked about inconsistency with the tag in the log file being shown/not shown. But all examples you posted showed the tags. You didn't answer Oxyd after he asked which lines did not have them.
Those are the lines I have problems with for example the join/leave lines don't have a player tag but then all the other ones don't. I would think a dev would have a log and would just look at the log after reading the post.

I Have included a log file if you still don't get it.

Re: [0.15.36] No UNBAN in log file

Posted: Thu Oct 12, 2017 9:44 am
by Klonan
badgamernl wrote:This is not what this Bug post is about but here you have some info on it:

Totally not true, the examples I gave showed the log lines with problems. they either did not have a tag or they did have one (inconsistent). If you really want me too I can give you a log and you can try to parse it with a minimal amount of code. It's not easy to do when half of the log is inconsistent (the examples I showed). If you have read the post, you should be able to get out that the solution would be to not show player tag in the log file.
First off all: A log tag showing/not showing inconsistency has nothing to do with what you are reporting here.
The Post was about log inconsistency in general even if 75% of it was about player tags.
Second of all: You talked about inconsistency with the tag in the log file being shown/not shown. But all examples you posted showed the tags. You didn't answer Oxyd after he asked which lines did not have them.
Those are the lines I have problems with for example the join/leave lines don't have a player tag but then all the other ones don't. I would think a dev would have a log and would just look at the log after reading the post.

I Have included a log file if you still don't get it.
So why didn't you just update the old bug report, instead of creating a new one?
You left the report hanging without any clarification, which if you provided, it would have been looked at

Re: Server log inconsistency

Posted: Thu Oct 12, 2017 9:50 am
by badgamernl
Klonan wrote: So why didn't you just update the old bug report, instead of creating a new one?
You left the report hanging without any clarification, which if you provided, it would have been looked at
I thought the old one was just dead and didn't think anyone would ever take it seriously. And i need the unban for a project I want to do.

Re: Server log inconsistency

Posted: Thu Oct 12, 2017 6:13 pm
by Cooldude2606
I help make the softmod for badgamernl's server. I have talked to him and found out exactly what he has being trying to say and this is what I have gotten from it I hope this clears up any errors he may have made or any comments that make it unclear about his true message of inconsistencies in the log file.

On the server we are using a rank / tag system, that is why some lines have [Owner] or [Guest] after the player name (I explain later that some lines don't when they should). This is something that adds inconsistency because its not needed in the log as the main reason that tags may be used is to allow other players to be informed by them; The log and who ever reads the log does not need to know the player tags. Also the join/leave lines are missing tags altogether and there and no unbans in the log file this needs to be there. The tags of players should either be removed from all lines or made so that it is clear which part is the name and which part is the tag, examples are shown below.
For Chat and Leave / Join
This is how it is now:
2017-07-14 16:35:45 [JOIN] Behohs joined the game
2017-07-14 16:35:53 [CHAT] Behohs [Guest]: hello
2017-07-14 19:33:08 [LEAVE] Behohs left the game
It should either not have any tags at all like this:
2017-07-14 16:35:45 [JOIN] Behohs joined the game
2017-07-14 16:35:53 [CHAT] Behohs: hello
2017-07-14 19:33:08 [LEAVE] Behohs left the game
...or have the tags in an easy to parse way for every line not just chat:
2017-07-14 16:35:45 [JOIN] Behohs '[Guest]' joined the game
2017-07-14 16:35:53 [CHAT] Behohs '[Guest]': hello
2017-07-14 19:33:08 [LEAVE] Behohs '[Guest]' left the game
For Bans
(please add unbans to the log)
This is how it is now:
2017-09-24 17:52:33 [BAN] ander277 was banned by FlipHalfling90 [Mod]. Reason: Griefing -24/09/2017- flip.
And again it should either have no tags at all like so:
2017-09-24 17:52:33 [BAN] ander277 was banned by FlipHalfling90. Reason: Griefing -24/09/2017- flip.
...or it should have it on both players not just one:
2017-09-24 17:52:33 [BAN] ander277 '[Guest]' was banned by FlipHalfling90 '[Mod]'. Reason: Griefing -24/09/2017- flip.
(again please add unbans to the log)
For Shouts
This is how it is now:
2017-06-29 17:19:43 BADgamerNL [Owner] (shout): test
The problem here is not so much the tag like the other examples but more so that it does not fit the formating of every other line.
What it would look like when formated like every other line and without player tags:
2017-06-29 17:19:43 [SHOUT] BADgamerNL: test
...and with tags:
2017-06-29 17:19:43 [SHOUT] BADgamerNL '[Owner]': test
For Commands
This is how it is now:
2017-06-23 12:15:15 [COMMAND] BADgamerNL [Owner] (command): game.forces["enemy"].kill_all_units()
2017-06-23 12:14:28 [WARNING] Player BADgamerNL [Owner] tried using a command "game.forces["enemy"].kill_all_units()"
The repertation of 'command' is not needed at all and should be removed.
You get the pattern by now; with no tags:
2017-06-23 12:15:15 [COMMAND] BADgamerNL: game.forces["enemy"].kill_all_units()
2017-06-23 12:14:28 [WARNING] BADgamerNL tried using a command "game.forces["enemy"].kill_all_units()"
...and with tags:
2017-06-23 12:15:15 [COMMAND] BADgamerNL '[Owner]': game.forces["enemy"].kill_all_units()
2017-06-23 12:14:28 [WARNING] BADgamerNL '[Owner]' tried using a command "game.forces["enemy"].kill_all_units()"
For all the above examples the more favouible option would be to have no tags as the main role for tags in the game is to inform other players rather than use in the log. For the ones which show tags it should work if any tag not just our tag system so simply adding ' ' to all our tags should not be the fix.

Re: Server log inconsistency

Posted: Thu Oct 12, 2017 6:32 pm
by Rseding91
Cooldude2606 wrote:For all the above examples the more favouible option would be to have no tags as the main role for tags in the game is to inform other players rather than use in the log. For the ones which show tags it should work if any tag not just our tag system so simply adding ' ' to all our tags should not be the fix.
All of the things you've mentioned (except adding unbans to the log) aren't likely to change. They're simply logging of what's shown in-game and no extra parsing is done. "(command)" is part of the message sent to players in-game to indicate that a command was run and then the same message is also sent to the log file. It's not "format message to player 1, format message to player 2 ,.... format message to log file)" it's just "format message and send to all players and log it".

Re: Server log inconsistency

Posted: Thu Oct 12, 2017 6:39 pm
by Rseding91
I've added "SHOUT" when shout is used and made un-bans show up in the log file. The rest of the things you mention are intended.