removed changes to g3::only_change_at_initialization at shutdown/init.

It is thread unsafe and should be done explicitly (also the threaded 100 threads calling with initialzation + shutdown was handing)... good test
This commit is contained in:
Kjell Hedstrom 2015-07-20 08:11:57 -06:00
parent 786b92a6d1
commit d5ad2709a7
2 changed files with 0 additions and 16 deletions

View File

@ -126,10 +126,6 @@ namespace g3 {
*/
void shutDownLogging() {
std::lock_guard<std::mutex> lock(g_logging_init_mutex);
#ifdef G3_DYNAMIC_LOGGING
g3::only_change_at_initialization::reset();
#endif
g_logger_instance = nullptr;
}

View File

@ -487,18 +487,6 @@ TEST(CustomLogLevels, AddANonFatal__ThenReset){
EXPECT_FALSE(g3::logLevel(MYINFO));
}
TEST(CustomLogLevels, AddANonFatal__ThenResetByLoggingShutdown) {
const LEVELS MYINFO {WARNING.value + 2, {"MY_INFO_LEVEL"}};
{
RestoreFileLogger logger(log_directory);
EXPECT_FALSE(g3::logLevel(MYINFO));
g3::only_change_at_initialization::setLogLevel(MYINFO, true);
EXPECT_TRUE(g3::logLevel(MYINFO));
}
EXPECT_FALSE(g3::logLevel(MYINFO)) << g3::only_change_at_initialization::printLevels();
}
TEST(CustomLogLevels, AddANonFatal__DidNotAddItToEnabledValue1){
RestoreFileLogger logger(log_directory);