clank
clank copied to clipboard
Clean up logging
Logging needs to be cleaned up, proposed standard:
- FINEST - Hex data, client ip address.
- FINER - packet disassembly and breakdown of packets.
- FINE - debug info such as worlds being created, ids, auths, ip addresses, players.
- INFO - informational messages, logging in, auth, chat, game creation, end report, ip addresses, players.
- WARN - warnings, not death, should be looked into or blocked if it's just bad clients.
- SEVERE - errors, bad stuff that needs to be fixed soon.
Example:
12:34:56.000 [FINEST] Raw data from 127.0.0.1:8080:
hex data...
12:34:56.000 [FINEST] Raw data to 127.0.0.1:8080:
hex data...
12:34:56.000 [FINER] Packet Disassembly from 127.0.0.1:8080:
pretty print data...
12:34:56.000 [FINER] Packet Disassembly to 127.0.0.1:8080:
pretty print data...
12:34:56.000 [FINE] Client 127.0.0.1:8080 requested to login with username 'hashsploit'. [1x]
... auth and internal db messages ...
12:34:60.000 [INFO] Player hashsploit (#0123456) logged in.
12:34:61.000 [FINE] [RPC] Sending heart-beat to RPC Server [id: xxxx]
12:34:62.000 [FINE] [RPC] Got response heart-beat from RPC Server [id: xxxx]
12:34:56.000 [INFO] Player hashsploit (#0123456) logged in.
12:34:56.000 [INFO] Player hashsploit (#0123456) logged out.
12:34:56.000 [FINE] Player hashsploit (#0123456) picked location 1 (Aquatos v2).
12:34:56.000 [INFO] [CH 3 (Staff Channel)] Player hashsploit (#0123456) joined.
12:34:56.000 [INFO] [CH 3 (Staff Channel)] [CHAT] hashsploit (#0123456): G
12:34:56.000 [INFO] [CH 3 (Staff Channel)] Player hashsploit (#0123456) left.