2020-10-14 18:20:49 -06:00
|
|
|
Moth Logs
|
|
|
|
=======
|
|
|
|
|
|
|
|
Moth has multiple log channels:
|
|
|
|
|
|
|
|
`points.log`
|
|
|
|
: the points log, used by server and scoreboard
|
|
|
|
|
|
|
|
`events.log`
|
|
|
|
: significant events, used to do manual analysis after an event
|
|
|
|
|
|
|
|
`stdout`
|
|
|
|
: HTTP server access
|
|
|
|
|
|
|
|
`stderr`
|
|
|
|
: warnings and errors
|
|
|
|
|
|
|
|
|
|
|
|
`points.log` format
|
|
|
|
----------------------
|
|
|
|
|
|
|
|
The points log is a space-separated file.
|
|
|
|
Each line has four fields:
|
|
|
|
|
|
|
|
| `timestamp` | `teamID` | `category` | `points` |
|
|
|
|
| --- | --- | --- | --- |
|
|
|
|
| int | string | string | int |
|
|
|
|
| Unix epoch | Team's unique ID | Name of category | Points awarded |
|
|
|
|
|
|
|
|
|
|
|
|
### Example
|
|
|
|
|
|
|
|
```
|
|
|
|
1602702696 2255 nocode 1
|
|
|
|
1602702705 2255 sequence 1
|
|
|
|
1602702787 2255 nocode 2
|
|
|
|
1602702831 2255 sequence 2
|
|
|
|
1602702839 9458 nocode 3
|
|
|
|
1602702896 2255 sequence 8
|
|
|
|
1602702900 9458 nocode 4
|
|
|
|
1602702913 2255 sequence 16
|
|
|
|
```
|
|
|
|
|
2021-10-21 18:25:49 -06:00
|
|
|
`events.csv` format
|
2020-10-14 18:20:49 -06:00
|
|
|
----------------------
|
|
|
|
|
2021-10-21 18:25:49 -06:00
|
|
|
The events log is a comma-separated variable (CSV) file.
|
|
|
|
It ought to import into any spreadsheet program painlessly.
|
|
|
|
|
2020-10-14 18:20:49 -06:00
|
|
|
Each line has six fields minimum:
|
|
|
|
|
2023-03-23 14:28:11 -06:00
|
|
|
| `timestamp` | `event` | `teamID` | `category` | `points` | `extra`... |
|
|
|
|
| --- | --- | --- | --- | --- | --- |
|
|
|
|
| int | string | string | string | int | string... |
|
|
|
|
| Unix epoch | Event type | Team's unique ID | Name of category, if any | Points awarded, if any | Additional fields, if any |
|
2020-10-14 18:20:49 -06:00
|
|
|
|
|
|
|
Fields after `points` contain extra fields associated with the event.
|
|
|
|
|
2020-10-15 10:23:39 -06:00
|
|
|
### Event types
|
|
|
|
|
|
|
|
These may change in the future.
|
|
|
|
|
|
|
|
* init: startup of server
|
|
|
|
* disabled: points accumulation disabled
|
|
|
|
* enabled: points accumulation re-enabled
|
2021-10-21 18:25:49 -06:00
|
|
|
* register: team registration
|
2020-10-15 10:23:39 -06:00
|
|
|
* load: puzzle load
|
|
|
|
* wrong: wrong answer submitted
|
|
|
|
* correct: correct answer submitted
|
|
|
|
|
2020-10-14 18:20:49 -06:00
|
|
|
### Example
|
|
|
|
|
|
|
|
```
|
2021-10-21 18:25:49 -06:00
|
|
|
1602716345,init,-,-,-,-,0
|
|
|
|
1602716349,load,2255,player5,sequence,1
|
|
|
|
1602716450,load,4824,player3,sequence,1
|
|
|
|
1602716359,correct,2255,player5,sequence,1
|
|
|
|
1602716423,wrong,4824,player3,sequence,1
|
|
|
|
1602716428,correct,4824,player3,sequence,1
|
|
|
|
1602716530,correct,4824,player3,sequence,1
|
|
|
|
1602716546,abduction,4824,player3,-,0,alien,FM1490
|
2020-10-14 18:20:49 -06:00
|
|
|
```
|
|
|
|
|
|
|
|
The final entry is a made-up "alien abduction" entry,
|
|
|
|
since at the time of writing,
|
|
|
|
we didn't have any actual events that wrote extra fields.
|