Feature #25
improve printd logging
Status: | Closed | Start date: | 10/19/2010 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | - | |||
Target version: | - | |||
Resolution: | fixed |
Description
currently only the printd is available, which can only print the severity and the log message.
it would be easier to write such log messages, if a macro, which uses __FILE__
, __LINE__
,... would be there.
Another possibility would be the use of a standard logging framework like log4cxx or boost.log
History
#1 Updated by sam g about 14 years ago
define STR_(S) #S define STR(S) STR_(S) define PRINTD(STATUS, FMT, ...) printd(STATUS, __FUNCTION__ ":" STR(__LINE__) ": " FMT, ##__VA_ARGS__)
would work, without any change in the printd function itself.
usage: PRINTD("init\n")
#2 Updated by sam g about 14 years ago
sam g wrote:
[...]
would work, without any change in the printd function itself.
usage:
PRINTD("init\n")
but only on WINDOWS systems, because gcc interprets __FUNCTION__
as a variable, thus concatinating is more difficult.
#3 Updated by sam g over 13 years ago
- Resolution set to fixed
done in branches/inVRs_OSG
new macros:
#define PRINTD(STATUS, FMT, ...) #define PRINTD_I(FMT, ...) #define PRINTD_W(FMT, ...) #define PRINTD_E(FMT, ...) #define PRINTD_D(FMT, ...)
#4 Updated by sam g over 13 years ago
- Status changed from New to Closed