all should work now, but test mrwautofunctiontracelog4cxx_test-mt fails, so no multithreading until this is fixed; refs #2
This commit is contained in:
@@ -253,10 +253,10 @@ namespace mrw {
|
||||
_tracer(tracer.begin(), tracer.end()) {
|
||||
log4cxx::Logger* logger(log4cxx::Logger::getLogger(_tracer));
|
||||
if (logger->isDebugEnabled()) {
|
||||
std::basic_stringstream<log4cxx::String::value_type> oss;
|
||||
std::basic_stringstream<std::string::value_type> oss;
|
||||
oss<<std::hex<<std::setw(15)<<_addr<<": "
|
||||
<<std::dec<<std::setw(2+_level)
|
||||
<<std::setfill(log4cxx::String::value_type(' '))<<"\\ "<<_name;
|
||||
<<std::setfill(std::string::value_type(' '))<<"\\ "<<_name;
|
||||
logger->forcedLog(MRW_LEVEL_DEBUG, oss.str(),
|
||||
MRW_LOG4CXX_LOCATION);
|
||||
++_level;
|
||||
@@ -269,9 +269,9 @@ namespace mrw {
|
||||
_tracer(tracer.begin(), tracer.end()) {
|
||||
log4cxx::Logger* logger(log4cxx::Logger::getLogger(_tracer));
|
||||
if (logger->isDebugEnabled()) {
|
||||
std::basic_stringstream<log4cxx::String::value_type> oss;
|
||||
std::basic_stringstream<std::string::value_type> oss;
|
||||
oss<<std::setw(17)<<' '
|
||||
<<std::setw(2+_level)<<std::setfill(log4cxx::String::value_type(' '))
|
||||
<<std::setw(2+_level)<<std::setfill(std::string::value_type(' '))
|
||||
<<"\\ "<<_name;
|
||||
logger->forcedLog(MRW_LEVEL_DEBUG, oss.str(),
|
||||
MRW_LOG4CXX_LOCATION);
|
||||
@@ -282,12 +282,12 @@ namespace mrw {
|
||||
log4cxx::Logger* logger(log4cxx::Logger::getLogger(_tracer));
|
||||
if (logger->isDebugEnabled()) {
|
||||
--_level;
|
||||
std::basic_stringstream<log4cxx::String::value_type> oss;
|
||||
std::basic_stringstream<std::string::value_type> oss;
|
||||
if (_addr)
|
||||
oss<<std::hex<<std::setw(15)<<_addr<<": "<<std::dec;
|
||||
else
|
||||
oss<<std::setw(17)<<' ';
|
||||
oss<<std::setw(2+_level)<<std::setfill(log4cxx::String::value_type(' '))
|
||||
oss<<std::setw(2+_level)<<std::setfill(std::string::value_type(' '))
|
||||
<<"/ "<<_name;
|
||||
logger->forcedLog(MRW_LEVEL_DEBUG, oss.str(),
|
||||
MRW_LOG4CXX_LOCATION);
|
||||
@@ -295,10 +295,10 @@ namespace mrw {
|
||||
}
|
||||
private:
|
||||
const void* _addr;
|
||||
const log4cxx::String _name;
|
||||
const std::string _name;
|
||||
const std::string _file;
|
||||
unsigned long _line;
|
||||
const log4cxx::String _tracer;
|
||||
const std::string _tracer;
|
||||
/** @todo for multithreading, use thread specific storage */
|
||||
static unsigned int _level;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user