Re: [AD] configurable logging |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Milan Mimica wrote:
Elias Pschernig wrote:
And finally whether to prepend log messages with file:linenumber, just
because I like to find things faster - but off by default.
I especially like this. Adding a function name would make it even more easy to read.
With gcc, very easy to do as it has __FUNCTION__. C99 only defines
__FILE__ and __LINE__ though, so I suspect MSVC won't have __FUNCTION__.
The use inside the source code would not change much from how it is
currently, except the somewhat cumbersome PREFIX_* definitions would not
exist any longer. At the beginning of each source file, we would instead
have something like:
Do you have an implementation already?
I have some proof-of-concept code inspired by Wine, yes. The hard part
will be changing all TRACE(PREFIX_W to ALLEGRO_WARN and filling in the
debug channels though.
--
Elias Pschernig <elias@xxxxxxxxxx>