Logging

From TheManaWorld
Jump to: navigation, search

zelalc

This article contains information for Programmers working or interested in working for The Mana World

This article is currently only a proposal

The features or design guidelines described in this article are only a proposal made by one or some persons. It has not been evaluated or accepted by the core development team yet. Feel free to add your personal opinion about them or make counter proposals.

Log levels

Proposition for log level usage:

  1. FATAL - Extremely serious error, the program can't continue execution
  2. ERROR - A serious error occured, but program keeps running
  3. WARN - Something weird was detected, but it does not harm further program execution
  4. INFO - Important events (e.g. new connection established)
  5. DEBUG - Intermediate results that could be useful while debugging
  6. TRACE - Parameter values, method start etc.

TRACE and FATAL are probably rarely used, while DEBUG and INFO are rather common. In releases we should probably default to log level 4, while we could ask users who are having problems to set it to 5 or 6.

It would probably be a good idea to code a log tab into the chat dialog or a log area in the debug window. This could have a different level by default, for example level 3 for releases. This way users would be better aware of the slightly more serious problems occuring while they play.