|
From: Tony C. <dra...@as...> - 2003-03-25 14:51:42
|
Hi,
Is there any plan to make use of the macros __FILE__ and __LINE__ to log
the filename and the line numbers automatically?
I am thinking of adding two parameters, line number and filename, to all
logging functions. For example, we add Category::info(int lineNumber,
const char* filename, const char* stringFormat, ...) and add two members
lineNumber, filename to LoggingEvent. In this way, the Layout classes
could make use of the lineNumber and filename, if exist.
Then one could use category.info(__LINE__, __FILE__, "server started"),
instead of category.info("%s %d server started", __FILE__, __LINE).
Any idea?
Tony
|