summaryrefslogtreecommitdiff
path: root/runtime/base/logging.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/base/logging.cc')
-rw-r--r--runtime/base/logging.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/base/logging.cc b/runtime/base/logging.cc
index f3e0918d33..0764b877a1 100644
--- a/runtime/base/logging.cc
+++ b/runtime/base/logging.cc
@@ -303,4 +303,13 @@ void LogMessage::LogLineLowStack(const char* file, unsigned int line, LogSeverit
#endif
}
+ScopedLogSeverity::ScopedLogSeverity(LogSeverity level) {
+ old_ = gMinimumLogSeverity;
+ gMinimumLogSeverity = level;
+}
+
+ScopedLogSeverity::~ScopedLogSeverity() {
+ gMinimumLogSeverity = old_;
+}
+
} // namespace art