Bug #2486
rsc logger seems to have problems with stringstreams
Status: | Resolved | Start date: | 02/11/2016 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 100% | |
Category: | - | |||
Target version: | - |
Description
When running the following program
#include <stdio.h> #include <rsc/logging/Logger.h> using namespace std; int main() { rsc::logging::LoggerPtr logger = rsc::logging::Logger::getLogger("testlogger"); stringstream s; for (uint i = 0; i < 5; ++i) { s << i << " "; } cout << s.str() << endl; RSCERROR(logger, "rsc::logging: " << s.str()); return EXIT_SUCCESS; }
I get the following output:
0 1 2 3 4 1455195279558 testlogger [ERROR]: rsc::logging:
But I would expect, that the rsc logger also outputs the values from the stringstream.
What is wrong here?
Associated revisions
Prevent variable name conflicts in logging macros
The logging macros contained a variable which was very likely to
conflict with client code variable names. Use something very unique now
to prevent this clash
fixes #2486
History
#1 Updated by J. Wienke about 8 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Applied in changeset rsc|6891d9d30349e33e29085243977e4ac67b9cee3f.