Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(288)

Side by Side Diff: base/logging.cc

Issue 4262001: Fixed bug where CHECKs don't fire if min_log_level > FATAL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed ipc_tests Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/logging.h ('k') | base/logging_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/logging.h" 5 #include "base/logging.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <io.h> 8 #include <io.h>
9 #include <windows.h> 9 #include <windows.h>
10 typedef HANDLE FileHandle; 10 typedef HANDLE FileHandle;
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 if (!log_file_name) 375 if (!log_file_name)
376 log_file_name = new PathString(); 376 log_file_name = new PathString();
377 *log_file_name = new_log_file; 377 *log_file_name = new_log_file;
378 if (delete_old == DELETE_OLD_LOG_FILE) 378 if (delete_old == DELETE_OLD_LOG_FILE)
379 DeleteFilePath(*log_file_name); 379 DeleteFilePath(*log_file_name);
380 380
381 return InitializeLogFileHandle(); 381 return InitializeLogFileHandle();
382 } 382 }
383 383
384 void SetMinLogLevel(int level) { 384 void SetMinLogLevel(int level) {
385 min_log_level = level; 385 min_log_level = std::min(LOG_ERROR_REPORT, level);
386 } 386 }
387 387
388 int GetMinLogLevel() { 388 int GetMinLogLevel() {
389 return min_log_level; 389 return min_log_level;
390 } 390 }
391 391
392 int GetVlogLevelHelper(const char* file, size_t N) { 392 int GetVlogLevelHelper(const char* file, size_t N) {
393 DCHECK_GT(N, 0U); 393 DCHECK_GT(N, 0U);
394 return g_vlog_info ? 394 return g_vlog_info ?
395 g_vlog_info->GetVlogLevel(base::StringPiece(file, N - 1)) : 395 g_vlog_info->GetVlogLevel(base::StringPiece(file, N - 1)) :
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 794
795 if (level == LOG_FATAL) 795 if (level == LOG_FATAL)
796 base::debug::BreakDebugger(); 796 base::debug::BreakDebugger();
797 } 797 }
798 798
799 } // namespace logging 799 } // namespace logging
800 800
801 std::ostream& operator<<(std::ostream& out, const wchar_t* wstr) { 801 std::ostream& operator<<(std::ostream& out, const wchar_t* wstr) {
802 return out << WideToUTF8(std::wstring(wstr)); 802 return out << WideToUTF8(std::wstring(wstr));
803 } 803 }
OLDNEW
« no previous file with comments | « base/logging.h ('k') | base/logging_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698