OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 // Need to include this before most other files because it defines | 7 // Need to include this before most other files because it defines |
8 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define | 8 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define |
9 // IPC_MESSAGE_MACROS_LOG_ENABLED so render_messages.h will generate the | 9 // IPC_MESSAGE_MACROS_LOG_ENABLED so render_messages.h will generate the |
10 // ViewMsgLog et al. functions. | 10 // ViewMsgLog et al. functions. |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 if (base::StringToInt(log_level, &level) && | 362 if (base::StringToInt(log_level, &level) && |
363 level >= 0 && level < LOG_NUM_SEVERITIES) { | 363 level >= 0 && level < LOG_NUM_SEVERITIES) { |
364 logging::SetMinLogLevel(level); | 364 logging::SetMinLogLevel(level); |
365 } else { | 365 } else { |
366 DLOG(WARNING) << "Bad log level: " << log_level; | 366 DLOG(WARNING) << "Bad log level: " << log_level; |
367 } | 367 } |
368 } | 368 } |
369 | 369 |
370 #if defined(OS_WIN) | 370 #if defined(OS_WIN) |
371 // Enable trace control and transport through event tracing for Windows. | 371 // Enable trace control and transport through event tracing for Windows. |
372 if (env->HasVar(env_vars::kEtwLogging)) | 372 logging::LogEventProvider::Initialize(kChromeTraceProviderName); |
373 logging::LogEventProvider::Initialize(kChromeTraceProviderName); | |
374 #endif | 373 #endif |
375 | 374 |
376 #ifdef NDEBUG | 375 #ifdef NDEBUG |
377 if (command_line.HasSwitch(switches::kSilentDumpOnDCHECK) && | 376 if (command_line.HasSwitch(switches::kSilentDumpOnDCHECK) && |
378 command_line.HasSwitch(switches::kEnableDCHECK)) { | 377 command_line.HasSwitch(switches::kEnableDCHECK)) { |
379 #if defined(OS_WIN) | 378 #if defined(OS_WIN) |
380 logging::SetLogReportHandler(DumpProcessAssertHandler); | 379 logging::SetLogReportHandler(DumpProcessAssertHandler); |
381 #endif | 380 #endif |
382 } | 381 } |
383 #endif // NDEBUG | 382 #endif // NDEBUG |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 #endif | 466 #endif |
468 } | 467 } |
469 | 468 |
470 #if defined(USE_LINUX_BREAKPAD) || defined(OS_MACOSX) | 469 #if defined(USE_LINUX_BREAKPAD) || defined(OS_MACOSX) |
471 void SetDumpWithoutCrashingFunction(void (*function)()) { | 470 void SetDumpWithoutCrashingFunction(void (*function)()) { |
472 dump_without_crashing_function_ = function; | 471 dump_without_crashing_function_ = function; |
473 } | 472 } |
474 #endif | 473 #endif |
475 | 474 |
476 } // namespace logging | 475 } // namespace logging |
OLD | NEW |