Add new_verbosity_level check.

GitOrigin-RevId: 1f02035863f382120a5881e2bb750c3d79ec6f98
This commit is contained in:
levlam 2018-08-25 03:08:10 +03:00
parent d76734ea73
commit f13452f756

View File

@ -43,8 +43,10 @@ void Log::set_max_file_size(int64 max_file_size) {
} }
void Log::set_verbosity_level(int new_verbosity_level) { void Log::set_verbosity_level(int new_verbosity_level) {
if (0 <= new_verbosity_level && new_verbosity_level <= 1024) {
SET_VERBOSITY_LEVEL(VERBOSITY_NAME(FATAL) + new_verbosity_level); SET_VERBOSITY_LEVEL(VERBOSITY_NAME(FATAL) + new_verbosity_level);
} }
}
void Log::set_fatal_error_callback(FatalErrorCallbackPtr callback) { void Log::set_fatal_error_callback(FatalErrorCallbackPtr callback) {
if (callback == nullptr) { if (callback == nullptr) {