mirror of
https://github.com/KjellKod/g3log.git
synced 2024-12-12 10:23:50 +01:00
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:
parent
786b92a6d1
commit
d5ad2709a7
@ -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;
|
||||
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user