| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 dialogs_are_suppressed_ = true; | 65 dialogs_are_suppressed_ = true; |
| 66 } | 66 } |
| 67 | 67 |
| 68 namespace logging { | 68 namespace logging { |
| 69 | 69 |
| 70 void InitChromeLogging(const CommandLine& command_line, | 70 void InitChromeLogging(const CommandLine& command_line, |
| 71 OldFileDeletionState delete_old_log_file) { | 71 OldFileDeletionState delete_old_log_file) { |
| 72 DCHECK(!chrome_logging_initialized_) << | 72 DCHECK(!chrome_logging_initialized_) << |
| 73 "Attempted to initialize logging when it was already initialized."; | 73 "Attempted to initialize logging when it was already initialized."; |
| 74 | 74 |
| 75 #if defined(OS_POSIX) && defined(IPC_MESSAGE_LOG_ENABLED) |
| 76 IPC::Logging::SetLoggerFunctions(g_log_function_mapping); |
| 77 #endif |
| 78 |
| 75 // only use OutputDebugString in debug mode | 79 // only use OutputDebugString in debug mode |
| 76 #ifdef NDEBUG | 80 #ifdef NDEBUG |
| 77 bool enable_logging = false; | 81 bool enable_logging = false; |
| 78 const wchar_t *kInvertLoggingSwitch = switches::kEnableLogging; | 82 const wchar_t *kInvertLoggingSwitch = switches::kEnableLogging; |
| 79 const logging::LoggingDestination kDefaultLoggingMode = | 83 const logging::LoggingDestination kDefaultLoggingMode = |
| 80 logging::LOG_ONLY_TO_FILE; | 84 logging::LOG_ONLY_TO_FILE; |
| 81 #else | 85 #else |
| 82 bool enable_logging = true; | 86 bool enable_logging = true; |
| 83 const wchar_t *kInvertLoggingSwitch = switches::kDisableLogging; | 87 const wchar_t *kInvertLoggingSwitch = switches::kDisableLogging; |
| 84 const logging::LoggingDestination kDefaultLoggingMode = | 88 const logging::LoggingDestination kDefaultLoggingMode = |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 assertions->push_back(wide_line); | 197 assertions->push_back(wide_line); |
| 194 ++assertion_count; | 198 ++assertion_count; |
| 195 } | 199 } |
| 196 } | 200 } |
| 197 log_file.close(); | 201 log_file.close(); |
| 198 | 202 |
| 199 return assertion_count; | 203 return assertion_count; |
| 200 } | 204 } |
| 201 | 205 |
| 202 } // namespace logging | 206 } // namespace logging |
| OLD | NEW |