Sorry for not being more specific. If I use the following code with the log4cxx.xml set to use a FileAppender:
DOMConfigurator::configure("log4cxx.xml"); logger_ = Logger::getLogger("TestApp"); double tmp = 100.12345; LOG4CXX_DEBUG(logger_,"value is "<<tmp); The string in the log file is "DEBUG TestApp- value is 100.123" The value of the variable was 100.12345 but only 100.123 was logged. How can I log the extra decimal places? I know one way is to use std::stringstream, set its precision, build the string myself, then pass it into log4cxx. However, I am concerned about performance and would hate to build the string only for it not to be logged because it is only a DEBUG log and need atleast INFO to log. On Mon, Jan 3, 2011 at 10:02 PM, Matthew Bingham <texbing...@gmail.com>wrote: > I cannot seem to find an answer to this anywhere. How can I increase > decimal precision when logging? Something like > std::stringstream::precision(). Is there a way to do it from the xml > configuration file? > > Thanks