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

Side by Side Diff: webrtc/base/logging.cc

Issue 1361173002: Enable logging for Mac by default on debug builds. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Adding NDEBUG check back Created 5 years, 2 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 for (StreamList::iterator it = streams_.begin(); it != streams_.end(); ++it) { 340 for (StreamList::iterator it = streams_.begin(); it != streams_.end(); ++it) {
341 min_sev = std::min(dbg_sev_, it->second); 341 min_sev = std::min(dbg_sev_, it->second);
342 } 342 }
343 min_sev_ = min_sev; 343 min_sev_ = min_sev;
344 } 344 }
345 345
346 void LogMessage::OutputToDebug(const std::string& str, 346 void LogMessage::OutputToDebug(const std::string& str,
347 LoggingSeverity severity, 347 LoggingSeverity severity,
348 const std::string& tag) { 348 const std::string& tag) {
349 bool log_to_stderr = log_to_stderr_; 349 bool log_to_stderr = log_to_stderr_;
350 #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) && (!defined(DEBUG) || defined(N DEBUG)) 350 #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) && (!defined(_DEBUG) || defined( NDEBUG))
351 // On the Mac, all stderr output goes to the Console log and causes clutter. 351 // On the Mac, all stderr output goes to the Console log and causes clutter.
352 // So in opt builds, don't log to stderr unless the user specifically sets 352 // So in opt builds, don't log to stderr unless the user specifically sets
353 // a preference to do so. 353 // a preference to do so.
354 CFStringRef key = CFStringCreateWithCString(kCFAllocatorDefault, 354 CFStringRef key = CFStringCreateWithCString(kCFAllocatorDefault,
355 "logToStdErr", 355 "logToStdErr",
356 kCFStringEncodingUTF8); 356 kCFStringEncodingUTF8);
357 CFStringRef domain = CFBundleGetIdentifier(CFBundleGetMainBundle()); 357 CFStringRef domain = CFBundleGetIdentifier(CFBundleGetMainBundle());
358 if (key != NULL && domain != NULL) { 358 if (key != NULL && domain != NULL) {
359 Boolean exists_and_is_valid; 359 Boolean exists_and_is_valid;
360 Boolean should_log = 360 Boolean should_log =
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 } 554 }
555 555
556 if (state) { 556 if (state) {
557 state->unprintable_count_[input] = consecutive_unprintable; 557 state->unprintable_count_[input] = consecutive_unprintable;
558 } 558 }
559 } 559 }
560 560
561 ////////////////////////////////////////////////////////////////////// 561 //////////////////////////////////////////////////////////////////////
562 562
563 } // namespace rtc 563 } // namespace rtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698