Neale Pickett
·
2023-03-23
logs.md
1Moth Logs
2=======
3
4Moth has multiple log channels:
5
6`points.log`
7: the points log, used by server and scoreboard
8
9`events.log`
10: significant events, used to do manual analysis after an event
11
12`stdout`
13: HTTP server access
14
15`stderr`
16: warnings and errors
17
18
19`points.log` format
20----------------------
21
22The points log is a space-separated file.
23Each line has four fields:
24
25| `timestamp` | `teamID` | `category` | `points` |
26| --- | --- | --- | --- |
27| int | string | string | int |
28| Unix epoch | Team's unique ID | Name of category | Points awarded |
29
30
31### Example
32
33```
341602702696 2255 nocode 1
351602702705 2255 sequence 1
361602702787 2255 nocode 2
371602702831 2255 sequence 2
381602702839 9458 nocode 3
391602702896 2255 sequence 8
401602702900 9458 nocode 4
411602702913 2255 sequence 16
42```
43
44`events.csv` format
45----------------------
46
47The events log is a comma-separated variable (CSV) file.
48It ought to import into any spreadsheet program painlessly.
49
50Each line has six fields minimum:
51
52| `timestamp` | `event` | `teamID` | `category` | `points` | `extra`... |
53| --- | --- | --- | --- | --- | --- |
54| int | string | string | string | int | string... |
55| Unix epoch | Event type | Team's unique ID | Name of category, if any | Points awarded, if any | Additional fields, if any |
56
57Fields after `points` contain extra fields associated with the event.
58
59### Event types
60
61These may change in the future.
62
63* init: startup of server
64* disabled: points accumulation disabled
65* enabled: points accumulation re-enabled
66* register: team registration
67* load: puzzle load
68* wrong: wrong answer submitted
69* correct: correct answer submitted
70
71### Example
72
73```
741602716345,init,-,-,-,-,0
751602716349,load,2255,player5,sequence,1
761602716450,load,4824,player3,sequence,1
771602716359,correct,2255,player5,sequence,1
781602716423,wrong,4824,player3,sequence,1
791602716428,correct,4824,player3,sequence,1
801602716530,correct,4824,player3,sequence,1
811602716546,abduction,4824,player3,-,0,alien,FM1490
82```
83
84The final entry is a made-up "alien abduction" entry,
85since at the time of writing,
86we didn't have any actual events that wrote extra fields.