LOG_* macros not working
|
|
---|---|
Hi, I tried to use the LOG_DEBUG macros in my device server. But they never work as they write for every format specifier just spaces. Now I tried the tango-test package from debian jessie(stable) and on executing that I get:
And TangoTest does the following: which according to documentation is correct. So I don't seem to do anything particularly wrong.Do I have to initialize something, somehow? Is that a plain bug? I can of course switch to debug streams but they are less nice to use. Thanks, Thomas |
|
|
---|---|
I've recompiled log4tango from the tango 8.1.2 distribution using which uses the system vsnprintf instead of the included one and now I get properly formatted output.
From [1] I know that vsnprintf is part of C++11. Conclusion: The log4tango package in debian has a bug which makes the LOG_ macros useless. This is due to the erroneous default on the builtin vsnprintf code. Builds nowadays should use the available library function vsnprintf. [1]: http://www.cplusplus.com/reference/cstdio/vsnprintf/ |