tworld
tworld copied to clipboard
Build interface to server logs
Errors that occur in your actions generally appear in your message pane output. However, errors that happen to other players have to be reported by them, and errors in timer events are completely lost. (Unless you ask me to grep the server logs.)
Better if log messages for a world were dumped into a database collection, with a build interface for the world's creator.
This should not include routine "Handling message" / "Finished command" logs (which I may drop anyhow). But error logs, definitely. And the log() script API.
These db-writes should "fork" from the main flow of control. I think that's easy.
How to decide what wid to use? Probably stuff in "task.logwid = ..." in a few key spots: cmd_timerevent, perform_action, meta_eval. If task.logwid is not set, don't put it in the database. (Admins can always grep the server logs.)