Commit d181f80a authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

Merge tag 'v4.4.0'

Release of version 4.4.0.
parents 7337c276 c7537f36
Pipeline #4022 passed with stage
in 1 minute and 52 seconds
......@@ -189,6 +189,7 @@ namespace hpp
{
writePrefix (std::cerr, channel, file, line, function);
std::cerr << incindent << data.rdbuf() << decindent << std::flush;
data.rdbuf()->pubseekpos(0);
}
namespace
......@@ -273,6 +274,7 @@ namespace hpp
writePrefix (stream, channel, file, line, function);
stream << incindent << data.rdbuf() << decindent << std::flush;
data.rdbuf()->pubseekpos(0);
}
Logging::Logging ()
......
......@@ -29,7 +29,7 @@ MACRO(DEFINE_TEST NAME LIB)
# Link against Boost.
TARGET_LINK_LIBRARIES(${NAME} ${Boost_LIBRARIES})
ADD_TEST(${NAME} ${RUNTIME_OUTPUT_DIRECTORY}/${NAME})
ADD_TEST(NAME ${NAME} COMMAND ${RUNTIME_OUTPUT_DIRECTORY}/${NAME})
ENDMACRO(DEFINE_TEST)
......@@ -39,3 +39,9 @@ DEFINE_TEST(assertion hpp-util)
DEFINE_TEST(exception hpp-util)
DEFINE_TEST(exception-factory hpp-util)
DEFINE_TEST(timer hpp-util)
SET(HPP_LOGGINGDIR "${CMAKE_CURRENT_BINARY_DIR}")
CONFIG_FILES(run_debug.sh)
ADD_EXECUTABLE(debug debug.cc)
TARGET_LINK_LIBRARIES(debug hpp-util ${Boost_LIBRARIES})
ADD_TEST(NAME debug COMMAND ${RUNTIME_OUTPUT_DIRECTORY}/run_debug.sh)
......@@ -26,12 +26,13 @@ using namespace hpp::debug;
int run_test ()
{
ConsoleOutput console;
JournalOutput out ("debug.test.log");
Channel channel ("TEST", boost::assign::list_of<Output*> (&out));
for (int i = 0; i < 100000; ++i) {
Channel channel ("TEST", boost::assign::list_of<Output*> (&out)(&console));
for (int i = 0; i < 100; ++i) {
std::stringstream ss;
ss << i << hpp::iendl;
out.write (channel, __FILE__, __LINE__, __PRETTY_FUNCTION__, ss.str());
channel.write (__FILE__, __LINE__, __PRETTY_FUNCTION__, ss);
}
return 0;
}
......
#!/bin/bash
export HPP_LOGGINGDIR=@HPP_LOGGINGDIR@
@CMAKE_BINARY_DIR@/tests/debug
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment