OLD | NEW |
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 "chrome/tools/crash_service/crash_service.h" | 5 #include "chrome/tools/crash_service/crash_service.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 #include <tchar.h> | 9 #include <tchar.h> |
10 | 10 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 FilePath operating_dir; | 43 FilePath operating_dir; |
44 GetCrashServiceDirectory(&operating_dir); | 44 GetCrashServiceDirectory(&operating_dir); |
45 FilePath log_file = operating_dir.Append(kStandardLogFile); | 45 FilePath log_file = operating_dir.Append(kStandardLogFile); |
46 | 46 |
47 // Logging to a file with pid, tid and timestamp. | 47 // Logging to a file with pid, tid and timestamp. |
48 logging::InitLogging( | 48 logging::InitLogging( |
49 log_file.value().c_str(), | 49 log_file.value().c_str(), |
50 logging::LOG_ONLY_TO_FILE, | 50 logging::LOG_ONLY_TO_FILE, |
51 logging::LOCK_LOG_FILE, | 51 logging::LOCK_LOG_FILE, |
52 logging::APPEND_TO_OLD_LOG_FILE, | 52 logging::APPEND_TO_OLD_LOG_FILE, |
53 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); | 53 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS, |
| 54 logging::DISABLE_DLOG_FOR_NON_OFFICIAL_RELEASE_BUILDS); |
54 logging::SetLogItems(true, true, true, false); | 55 logging::SetLogItems(true, true, true, false); |
55 | 56 |
56 VLOG(1) << "session start. cmdline is [" << cmd_line << "]"; | 57 VLOG(1) << "session start. cmdline is [" << cmd_line << "]"; |
57 | 58 |
58 CrashService crash_service(operating_dir.value()); | 59 CrashService crash_service(operating_dir.value()); |
59 if (!crash_service.Initialize(::GetCommandLineW())) | 60 if (!crash_service.Initialize(::GetCommandLineW())) |
60 return 1; | 61 return 1; |
61 | 62 |
62 VLOG(1) << "ready to process crash requests"; | 63 VLOG(1) << "ready to process crash requests"; |
63 | 64 |
64 // Enter the message loop. | 65 // Enter the message loop. |
65 int retv = crash_service.ProcessingLoop(); | 66 int retv = crash_service.ProcessingLoop(); |
66 // Time to exit. | 67 // Time to exit. |
67 VLOG(1) << "session end. return code is " << retv; | 68 VLOG(1) << "session end. return code is " << retv; |
68 return retv; | 69 return retv; |
69 } | 70 } |
OLD | NEW |