I was looking through the list, and mostly realise I still wouldn't really know where to put a new debug message. At the same time I realised that this is a solved problem. So I am wondering, shouldn't we just use default logging facility stuff, so basically: fatal / error / warning / info / debug.
Fatal: an error we cannot recover from. You can expect degraded performance because of it.
Error: an error we recovered from, for example by showing a (clear) error to the user.
Warning: things that are not right, but also not wrong.
Info: things worth mentioning to the user if he is interested.
Debug: not useful for anyone except when debugging a problem.
When I map that to the DEBUG entries we have, you get something like:
0 - Fatal - cannot bind, cannot create socket, cannot redirect DEBUG, cannot open file, setting non-blocking fails, illegal packet received
1 - Error - disconnect from server, connection lost, broadcast failed
2 - Warning - "loading game failed, so a new game will be started", wrong password, invalid chat action, not supported (admin stuff)
3 - Info - client connected, starting network, shutdown network
4 - ??
5 - Debug 1 - DNS resolvement, connection attempts, server responses
6 - Debug 2 - Details DNS resolvement, HTTP connect, redirect, download status
7 - Trace - Received frame / sent frame
And we change the Dedicated server to be on net=4 (instead of net=6)
That's a nice start, and I guess the current state is such a mess (I suppose due to historical "visual flying"), redefining the whole debug levels system from a blank specifications canvas is a good idea.
What about the following?
Let's see if/how eveything fits in the system you suggest and whether we run into an undecided for some debug directives?
Everything fits, we move 5-7 to 4-6 and jump to 3.
Back to the drawing board to respecify levels based on the undecided cases, and jump to 1.
We kinda already implemented this a while ago :) Not sure why this discussion was not linked ;) But the above information is what is currently implemented for 12.0-beta :) And we found nothing that didn't fit the above while doing so :)
Edit: grr, it was linked, GitHub just doesn't show that: #9251