Re: [AD] TRACEs in xkeyboard.c |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Fri, 2005-09-23 at 08:58 +0200, Evert Glebbeek wrote:
> > Isn't there debugmode verboseness levels? At level 2, or
> > something higher than the default I wouldn't really mind.
>
> If they're for debugging Allegro itself, then they should only be active at
> level 2, not level 1.
>
Can you elaborate? Is this something supposed to be already present in
Allegro? (Docs, configure --help and header files indicate otherwise..)
It shouldn't be hard to add debug levels of course. allegro_init could
read the configure variable "ALLEGRO_DEBUG", which would be a number, or
better a list of strings: "error", "warning", "info", "debug".
"error" would be like now (except x keyboard)
"warning" would be for things which are likely not what is wanted (e.g.
unusual color conversion, unstable driver selected, XIM not found under
X,...) I'm sure once it gets used there will be many places for it.
"info" would write out info about what Allegro is doing. E.g. that would
be the level where the X11 keys would be listed. It would be used for
things which might be interesting to the user - in the example, it is
helpful for configuring the [xkeyboard] section in the config.
"debug" would be messages only useful for debugging. We would probably
ask to use this output level with bug reports.
Then, there would be new functions:
al_error, al_warning, al_info, al_debug which would work like al_trace,
just check if the right debugging level was included in allegro_init.
(Or it could be one function with a parameter.)
al_trace would not be used by internal code directly anymore.
I'd say it can only be done for new_api_branch though.
--
Elias Pschernig