|
|
|
@ -9,6 +9,9 @@ |
|
|
|
|
@license LGPL, see file <a href="license.html">COPYING</a> |
|
|
|
|
|
|
|
|
|
$Log$ |
|
|
|
|
Revision 1.2 2005/04/07 20:42:38 marc |
|
|
|
|
renamed loggerhierarchy from mrw.gccfunctiontrace to mrw.fn |
|
|
|
|
|
|
|
|
|
Revision 1.1 2005/03/11 21:07:54 marc |
|
|
|
|
initial version |
|
|
|
|
|
|
|
|
@ -92,7 +95,7 @@ extern "C" int main(int, char**); |
|
|
|
|
- optional: boost for thread support http://boost.org
|
|
|
|
|
|
|
|
|
|
The logger hiararchy name is: @c |
|
|
|
|
"mrw.gccfunctiontrace.<full-method-name>" where @c |
|
|
|
|
"mrw.fn.<full-method-name>" where @c |
|
|
|
|
<full-method-name> is the full name of the method, including |
|
|
|
|
namespace and class name, seperated not by double colon @c :: but |
|
|
|
|
by single dots @c . as it is common use in log4cxx. This way, you |
|
|
|
@ -111,15 +114,15 @@ extern "C" int main(int, char**); |
|
|
|
|
|
|
|
|
|
@verbatim |
|
|
|
|
log4j.rootLogger = OFF, A1 |
|
|
|
|
log4j.logger.mrw.gccfunctiontrace = DEBUG |
|
|
|
|
log4j.logger.mrw.gccfunctiontrace.log4cxx = OFF |
|
|
|
|
log4j.logger.mrw.gccfunctiontrace.boost = OFF |
|
|
|
|
log4j.logger.mrw.gccfunctiontrace.Thread = OFF |
|
|
|
|
log4j.logger.mrw.gccfunctiontrace.mrw = OFF |
|
|
|
|
log4j.logger.mrw.gccfunctiontrace.std = OFF |
|
|
|
|
log4j.logger.mrw.gccfunctiontrace.new = OFF |
|
|
|
|
log4j.logger.mrw.gccfunctiontrace.CppUnit = OFF |
|
|
|
|
log4j.logger.mrw.gccfunctiontrace.__gnu_cxx = OFF |
|
|
|
|
log4j.logger.mrw.fn = DEBUG, A1 |
|
|
|
|
log4j.logger.mrw.fn.log4cxx = OFF, A1 |
|
|
|
|
log4j.logger.mrw.fn.boost = OFF, A1 |
|
|
|
|
log4j.logger.mrw.fn.Thread = OFF, A1 |
|
|
|
|
log4j.logger.mrw.fn.mrw = OFF, A1 |
|
|
|
|
log4j.logger.mrw.fn.std = OFF, A1 |
|
|
|
|
log4j.logger.mrw.fn.new = OFF, A1 |
|
|
|
|
log4j.logger.mrw.fn.CppUnit = OFF, A1 |
|
|
|
|
log4j.logger.mrw.fn.__gnu_cxx = OFF, A1 |
|
|
|
|
log4j.appender.A1 = org.apache.log4j.FileAppender |
|
|
|
|
log4j.appender.A1.layout = org.apache.log4j.PatternLayout |
|
|
|
|
log4j.appender.A1.layout.ConversionPattern = %t-%-41c%m%n |
|
|
|
@ -131,28 +134,29 @@ log4j.appender.A1.filename = filename.log |
|
|
|
|
information): |
|
|
|
|
|
|
|
|
|
@verbatim |
|
|
|
|
mrw.gccfunctiontrace.anotherFunction \ anotherFunction() |
|
|
|
|
mrw.gccfunctiontrace.HalloWelt.fn1 \ HalloWelt::fn1() |
|
|
|
|
mrw.gccfunctiontrace.HalloWelt.fn \ HalloWelt::fn() |
|
|
|
|
mrw.gccfunctiontrace.HalloWelt.A.method \ HalloWelt::A::method() |
|
|
|
|
mrw.gccfunctiontrace.HalloWelt.A.method / HalloWelt::A::method() |
|
|
|
|
mrw.gccfunctiontrace.HalloWelt.A.method \ HalloWelt::A::method() |
|
|
|
|
mrw.gccfunctiontrace.HalloWelt.A.method / HalloWelt::A::method() |
|
|
|
|
mrw.gccfunctiontrace.HalloWelt.fn / HalloWelt::fn() |
|
|
|
|
mrw.gccfunctiontrace.HalloWelt.fn \ HalloWelt::fn() |
|
|
|
|
mrw.gccfunctiontrace.HalloWelt.A.method \ HalloWelt::A::method() |
|
|
|
|
mrw.gccfunctiontrace.HalloWelt.A.method / HalloWelt::A::method() |
|
|
|
|
mrw.gccfunctiontrace.HalloWelt.A.method \ HalloWelt::A::method() |
|
|
|
|
mrw.gccfunctiontrace.HalloWelt.A.method / HalloWelt::A::method() |
|
|
|
|
mrw.gccfunctiontrace.HalloWelt.fn / HalloWelt::fn() |
|
|
|
|
mrw.gccfunctiontrace.HalloWelt.fn1 / HalloWelt::fn1() |
|
|
|
|
mrw.gccfunctiontrace.anotherFunction / anotherFunction() |
|
|
|
|
mrw.fn.anotherFunction \ anotherFunction() |
|
|
|
|
mrw.fn.HalloWelt.fn1 \ HalloWelt::fn1() |
|
|
|
|
mrw.fn.HalloWelt.fn \ HalloWelt::fn() |
|
|
|
|
mrw.fn.HalloWelt.A.method \ HalloWelt::A::method() |
|
|
|
|
mrw.fn.HalloWelt.A.method / HalloWelt::A::method() |
|
|
|
|
mrw.fn.HalloWelt.A.method \ HalloWelt::A::method() |
|
|
|
|
mrw.fn.HalloWelt.A.method / HalloWelt::A::method() |
|
|
|
|
mrw.fn.HalloWelt.fn / HalloWelt::fn() |
|
|
|
|
mrw.fn.HalloWelt.fn \ HalloWelt::fn() |
|
|
|
|
mrw.fn.HalloWelt.A.method \ HalloWelt::A::method() |
|
|
|
|
mrw.fn.HalloWelt.A.method / HalloWelt::A::method() |
|
|
|
|
mrw.fn.HalloWelt.A.method \ HalloWelt::A::method() |
|
|
|
|
mrw.fn.HalloWelt.A.method / HalloWelt::A::method() |
|
|
|
|
mrw.fn.HalloWelt.fn / HalloWelt::fn() |
|
|
|
|
mrw.fn.HalloWelt.fn1 / HalloWelt::fn1() |
|
|
|
|
mrw.fn.anotherFunction / anotherFunction() |
|
|
|
|
@endverbatim |
|
|
|
|
|
|
|
|
|
@note The configurator is not installed automatically. If you |
|
|
|
|
want to trace e.g. on the console, you have to call @c |
|
|
|
|
log4cxx::BasicConfigurator::configure(); as first statement |
|
|
|
|
in your @c main(). |
|
|
|
|
in your @c main(). @see @ref AutoInitLog4cxx if you also want to |
|
|
|
|
automatically configure @c log4cxx. |
|
|
|
|
|
|
|
|
|
@section AutoFunctionTraceThread Multithreading |
|
|
|
|
|
|
|
|
@ -189,7 +193,7 @@ extern "C" void __cyg_profile_func_enter(void *this_fn, void*) { |
|
|
|
|
std::string::size_type p(hierarchy.rfind(' ', hierarchy.find('<'))); |
|
|
|
|
if (p!=std::string::npos) hierarchy.erase(0, p+1); |
|
|
|
|
log4cxx::Logger* logger |
|
|
|
|
(log4cxx::Logger::getLogger(_T("mrw.gccfunctiontrace.")+hierarchy)); |
|
|
|
|
(log4cxx::Logger::getLogger(_T("mrw.fn.")+hierarchy)); |
|
|
|
|
if (logger->isDebugEnabled()) { |
|
|
|
|
std::stringstream ss; |
|
|
|
|
ss<<std::setw(2+mrw::info.level++)<<std::setfill(' ') |
|
|
|
@ -222,7 +226,7 @@ extern "C" void __cyg_profile_func_exit(void *this_fn, void*) { |
|
|
|
|
std::string::size_type p(hierarchy.rfind(' ', hierarchy.find('<'))); |
|
|
|
|
if (p!=std::string::npos) hierarchy.erase(0, p+1); |
|
|
|
|
log4cxx::Logger* logger |
|
|
|
|
(log4cxx::Logger::getLogger(_T("mrw.gccfunctiontrace.")+hierarchy)); |
|
|
|
|
(log4cxx::Logger::getLogger(_T("mrw.fn.")+hierarchy)); |
|
|
|
|
if (logger->isDebugEnabled()) { |
|
|
|
|
std::stringstream ss; |
|
|
|
|
ss<<std::setw(2+--mrw::info.level)<<std::setfill(' ') |
|
|
|
|