Lines Matching refs:GetInstance
44 DebugLogger::GetInstance()->Reset();
49 DebugLogger::GetInstance()->Reset();
61 DebugLogger::GetInstance()->exitOnFatal_ = false;
62 DebugLevel oldLevel = DebugLogger::GetInstance()->GetLogLevel();
63 DebugLogger::GetInstance()->SetLogLevel(testlevel);
83 fflush(DebugLogger::GetInstance()->file_);
84 log = ReadFileToString(DebugLogger::GetInstance()->logPath_);
89 if (testlevel > LEVEL_FATAL or DebugLogger::GetInstance()->enableHilog_ or
90 DebugLogger::GetInstance()->logDisabled_) {
104 DebugLogger::GetInstance()->SetLogLevel(oldLevel);
105 DebugLogger::GetInstance()->exitOnFatal_ = true;
115 DebugLogger::GetInstance()->SetMixLogOutput(true);
130 DebugLogger::GetInstance()->SetMixLogOutput(false);
150 DebugLogger::GetInstance()->SetMixLogOutput(true);
155 DebugLogger::GetInstance()->SetMixLogOutput(false);
174 * @tc.name: GetInstance
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);
225 DebugLogger::GetInstance()->SetLogTags("DebugTest");
227 EXPECT_EQ(DebugLogger::GetInstance()->ShouldLog(LEVEL_MUCH, "DebugTest"), true);
228 EXPECT_EQ(DebugLogger::GetInstance()->ShouldLog(LEVEL_DEBUG, "DebugTest"), true);
230 EXPECT_EQ(DebugLogger::GetInstance()->ShouldLog(LEVEL_MUCH, errorLogTag), false);
231 EXPECT_EQ(DebugLogger::GetInstance()->ShouldLog(LEVEL_DEBUG, errorLogTag), true);
233 DebugLogger::GetInstance()->SetLogTags(errorLogTags);
235 EXPECT_EQ(DebugLogger::GetInstance()->ShouldLog(LEVEL_MUCH, "DebugTest"), false);
236 EXPECT_EQ(DebugLogger::GetInstance()->ShouldLog(LEVEL_DEBUG, "DebugTest"), true);
238 EXPECT_EQ(DebugLogger::GetInstance()->ShouldLog(LEVEL_MUCH, errorLogTag), true);
239 EXPECT_EQ(DebugLogger::GetInstance()->ShouldLog(LEVEL_DEBUG, errorLogTag), true);
241 DebugLogger::GetInstance()->SetLogTags(mixLogTags);
243 EXPECT_EQ(DebugLogger::GetInstance()->ShouldLog(LEVEL_MUCH, "DebugTest"), true);
244 EXPECT_EQ(DebugLogger::GetInstance()->ShouldLog(LEVEL_DEBUG, "DebugTest"), true);
246 DebugLogger::GetInstance()->SetLogTags(LogTags);
248 EXPECT_EQ(DebugLogger::GetInstance()->ShouldLog(LEVEL_MUCH, "DebugTest"), false);
249 EXPECT_EQ(DebugLogger::GetInstance()->ShouldLog(LEVEL_VERBOSE, "DebugTest"), true);
252 DebugLogger::GetInstance()->SetLogTags("");
263 DebugLogger::GetInstance()->Disable(true);
264 ASSERT_EQ(DebugLogger::GetInstance()->logDisabled_, true);
268 ASSERT_EQ(DebugLogger::GetInstance()->logDisabled_, true);
271 DebugLogger::GetInstance()->Disable(false);
272 ASSERT_EQ(DebugLogger::GetInstance()->logDisabled_, false);
286 DebugLogger::GetInstance()->EnableHiLog(true);
290 DebugLogger::GetInstance()->EnableHiLog(false);