Lines Matching refs:GetInstance
44 DebugLogger::GetInstance()->Reset(); in SetUpTestCase()
49 DebugLogger::GetInstance()->Reset(); in TearDownTestCase()
61 DebugLogger::GetInstance()->exitOnFatal_ = false; in LogLevelTest()
62 DebugLevel oldLevel = DebugLogger::GetInstance()->GetLogLevel(); in LogLevelTest()
63 DebugLogger::GetInstance()->SetLogLevel(testlevel); in LogLevelTest()
83 fflush(DebugLogger::GetInstance()->file_); in LogLevelTest()
84 log = ReadFileToString(DebugLogger::GetInstance()->logPath_); in LogLevelTest()
89 if (testlevel > LEVEL_FATAL or DebugLogger::GetInstance()->enableHilog_ or in LogLevelTest()
90 DebugLogger::GetInstance()->logDisabled_) { in LogLevelTest()
104 DebugLogger::GetInstance()->SetLogLevel(oldLevel); in LogLevelTest()
105 DebugLogger::GetInstance()->exitOnFatal_ = true; in LogLevelTest()
115 DebugLogger::GetInstance()->SetMixLogOutput(true);
130 DebugLogger::GetInstance()->SetMixLogOutput(false);
150 DebugLogger::GetInstance()->SetMixLogOutput(true);
155 DebugLogger::GetInstance()->SetMixLogOutput(false);
178 HWTEST_F(DebugLoggerTest, GetInstance, TestSize.Level1)
180 EXPECT_NE(DebugLogger::GetInstance(), nullptr);
196 DebugLogger::GetInstance()->SetLogPath(logFile1);
200 DebugLogger::GetInstance()->SetLogPath(logFile2);
204 DebugLogger::GetInstance()->SetLogPath(logFile3);
208 DebugLogger::GetInstance()->SetLogPath(DEFAULT_LOG_PATH);
224 DebugLogger::GetInstance()->SetLogTags("DebugTest");
226 EXPECT_EQ(DebugLogger::GetInstance()->ShouldLog(LEVEL_MUCH, "DebugTest"), true);
227 EXPECT_EQ(DebugLogger::GetInstance()->ShouldLog(LEVEL_DEBUG, "DebugTest"), true);
229 EXPECT_EQ(DebugLogger::GetInstance()->ShouldLog(LEVEL_MUCH, errorLogTag), false);
230 EXPECT_EQ(DebugLogger::GetInstance()->ShouldLog(LEVEL_DEBUG, errorLogTag), true);
232 DebugLogger::GetInstance()->SetLogTags(errorLogTags);
234 EXPECT_EQ(DebugLogger::GetInstance()->ShouldLog(LEVEL_MUCH, "DebugTest"), false);
235 EXPECT_EQ(DebugLogger::GetInstance()->ShouldLog(LEVEL_DEBUG, "DebugTest"), true);
237 EXPECT_EQ(DebugLogger::GetInstance()->ShouldLog(LEVEL_MUCH, errorLogTag), true);
238 EXPECT_EQ(DebugLogger::GetInstance()->ShouldLog(LEVEL_DEBUG, errorLogTag), true);
240 DebugLogger::GetInstance()->SetLogTags(mixLogTags);
242 EXPECT_EQ(DebugLogger::GetInstance()->ShouldLog(LEVEL_MUCH, "DebugTest"), true);
243 EXPECT_EQ(DebugLogger::GetInstance()->ShouldLog(LEVEL_DEBUG, "DebugTest"), true);
246 DebugLogger::GetInstance()->SetLogTags("");
257 DebugLogger::GetInstance()->Disable(true);
258 ASSERT_EQ(DebugLogger::GetInstance()->logDisabled_, true);
262 ASSERT_EQ(DebugLogger::GetInstance()->logDisabled_, true);
265 DebugLogger::GetInstance()->Disable(false);
266 ASSERT_EQ(DebugLogger::GetInstance()->logDisabled_, false);
280 DebugLogger::GetInstance()->EnableHiLog(true);
284 DebugLogger::GetInstance()->EnableHiLog(false);