You are not logged in.

#1 2015-09-16 06:34:20

dev
Member
Registered: 2015-09-15
Posts: 7

Generating stats with logfiles

Hey there,
Didn't found any logs on my dedicated server. I only see when someone (dis-)connects - but this without timestamps.
Would be cool if there was a logfile with all the actions (kills, self-destruction...) to generate online-stats for the server.

Offline

#2 2015-09-16 08:01:09

freanux
Administrator
Registered: 2015-09-07
Posts: 33
Website

Re: Generating stats with logfiles

Hi dev

Thanks for this input. I will add this feature in the next release 0.3.9.

Offline

#3 2015-09-16 13:50:04

quci
Member
Registered: 2015-09-15
Posts: 6
Website

Re: Generating stats with logfiles

Yeah great! Then it would be time for me to get dooooown to business and build some cool stat pages with sweet graphs big_smile

Grüessli us Egerkingen tongue


"So this, then, was the kernel of the goat!" -  Goathes Faust

Offline

#4 2015-09-16 14:07:45

freanux
Administrator
Registered: 2015-09-07
Posts: 33
Website

Re: Generating stats with logfiles

Cool, if you have some special wishes how logs should be formatted, please let me know.

Grüessli us Walenstadt big_smile

Offline

#5 2015-09-16 14:29:53

quci
Member
Registered: 2015-09-15
Posts: 6
Website

Re: Generating stats with logfiles

Just one line after another, that would be sufficient wink

Log lines containing a timestamp and some descriptive text stating what happened, like "dev committed suicide" or "dev killed by qucis exploding grandmother" would be great. To keep the parser even simpler it would be cool to have the victim and the actor clearly visible. Maybe something like this...

[timestamp] [map] [actor] [victim] [weapon]
2015-09-16 16:24:58 "The Cave" "quci" "dev" "BFG9000"
2015-09-16 16:24:58 "The Cave" "dev" "dev" "dropped to death"


"So this, then, was the kernel of the goat!" -  Goathes Faust

Offline

#6 2015-09-17 08:06:40

freanux
Administrator
Registered: 2015-09-07
Posts: 33
Website

Re: Generating stats with logfiles

okay, yesterday evening i did it, now you will get a server output like this:

2015-09-16 19:59:40 000 "freanux connected" "freanux"
2015-09-16 19:59:40 002 "ctf2" "Capture The Vacuum"
2015-09-16 19:59:43 009 "ctf2" "Capture The Vacuum" "freanux joins the team red" "freanux"
2015-09-16 19:59:53 008 "ctf2" "Capture The Vacuum" "freanux killed himself" "freanux" "bomb_explosion"
2015-09-16 20:00:07 008 "ctf2" "Capture The Vacuum" "freanux committed suicide" "freanux" "tile"
2015-09-16 20:00:22 014 "ctf2" "Capture The Vacuum" "freanux catched the blue flag" "freanux"
2015-09-16 20:00:26 015 "ctf2" "Capture The Vacuum" "the blue flag dropped" "freanux"
2015-09-16 20:00:28 014 "ctf2" "Capture The Vacuum" "freanux catched the blue flag" "freanux"
2015-09-16 20:00:33 019 "ctf2" "Capture The Vacuum" "team red team scores" "freanux"
2015-09-16 20:00:35 001 "freanux disconnected" "freanux"

the second column is the type of log entry:

000 = LogTypePlayerConnect
001 = LogTypePlayerDisconnect
002 = LogTypeNewMap
003 = LogTypeChatMessage
004 = LogTypeWarmUp
005 = LogTypeGameBegins
006 = LogTypeGameEnds
007 = LogTypeFrag
008 = LogTypeKill
009 = LogTypeRedTeamJoin
010 = LogTypeBlueTeamJoin
011 = LogTypeRedFlagPicked
012 = LogTypeRedFlagDropped
013 = LogTypeRedFlagSaved
014 = LogTypeBlueFlagPicked
015 = LogTypeBlueFlagDropped
016 = LogTypeBlueFlagSaved
017 = LogTypeCoinPicked
018 = LogTypeCoinDropped
019 = LogTypeTeamRedScored
020 = LogTypeTeamBlueScored
021 = LogTypeRoundFinished

Offline

#7 2015-09-17 08:15:59

quci
Member
Registered: 2015-09-15
Posts: 6
Website

Re: Generating stats with logfiles

Delicious! big_smile Thx


"So this, then, was the kernel of the goat!" -  Goathes Faust

Offline

#8 2015-09-17 08:37:49

freanux
Administrator
Registered: 2015-09-07
Posts: 33
Website

Re: Generating stats with logfiles

i planned to redirect the log output into a specified file. note that the order of the log types may change over again until i released the version 0.3.9. i will drop you a message with all informations.

Offline

#9 2015-09-17 09:06:59

quci
Member
Registered: 2015-09-15
Posts: 6
Website

Re: Generating stats with logfiles

Great! smile Is there a possibility for us to get our greedy hands on a pre-release, so I'm able to test my stats already?


"So this, then, was the kernel of the goat!" -  Goathes Faust

Offline

#10 2015-09-17 09:23:07

freanux
Administrator
Registered: 2015-09-07
Posts: 33
Website

Re: Generating stats with logfiles

of course. wink i think this evening i will upload the new source package for you. note, that the protocol version changed; so the new release 0.3.9 (and your prerelease also) is not compatible with 0.3.8 any more.

notice: with that version you can define a log file in the server configuration:

logfile (optional)

logfile=/var/log/serverstat.log

Define a log output file for dedicated server mode.

Offline

#11 2015-09-17 09:25:50

freanux
Administrator
Registered: 2015-09-07
Posts: 33
Website

Re: Generating stats with logfiles

ah i forgot: have a look into that file

src/Engine/src/ServerLogger.cpp

to find out, how log entries are formatted.

if something is unclear, please ask.

Offline

#12 2015-09-17 09:32:11

quci
Member
Registered: 2015-09-15
Posts: 6
Website

Re: Generating stats with logfiles

As any average cat would say... this is purrrfect! Thanks mate!


"So this, then, was the kernel of the goat!" -  Goathes Faust

Offline

#13 2015-09-17 16:59:28

freanux
Administrator
Registered: 2015-09-07
Posts: 33
Website

Re: Generating stats with logfiles

okay, i uploaded the new version. i had to make heavy code modifications at different places. please let me know, if something goes wrong.

Download Goat Attack source 0.3.8.2

good luck big_smile

Offline

#14 2015-09-17 19:13:00

dev
Member
Registered: 2015-09-15
Posts: 7

Re: Generating stats with logfiles

Works great!
Thank you smile

Offline

Board footer

Powered by FluxBB