Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Commit

Permalink
Tests: disable libs' singleton logger
Browse files Browse the repository at this point in the history
Stops log spam when running unit-tests.

Resolves #918
  • Loading branch information
anonimal committed Jun 24, 2018
1 parent 526f308 commit 8e98528
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/unit_tests/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,19 @@
#define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp>

#include "core/util/log.h"

/// @brief Disable log spam from the libs for all unit-tests
/// @note This won't disable logs that boost.test specific
struct Logger final
{
Logger()
{
boost::log::core::get()->set_logging_enabled(false);
}
~Logger() = default;
};

BOOST_GLOBAL_FIXTURE(Logger);

// Skeleton Main for TEST_DYN_LINK tests

0 comments on commit 8e98528

Please sign in to comment.