OLD | NEW |
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium OS 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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "crash-reporter/kernel_collector.h" | 10 #include "crash-reporter/kernel_collector.h" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 } | 136 } |
137 return 0; | 137 return 0; |
138 } | 138 } |
139 | 139 |
140 | 140 |
141 int main(int argc, char *argv[]) { | 141 int main(int argc, char *argv[]) { |
142 google::ParseCommandLineFlags(&argc, &argv, true); | 142 google::ParseCommandLineFlags(&argc, &argv, true); |
143 FilePath my_path(argv[0]); | 143 FilePath my_path(argv[0]); |
144 file_util::AbsolutePath(&my_path); | 144 file_util::AbsolutePath(&my_path); |
145 s_metrics_lib.Init(); | 145 s_metrics_lib.Init(); |
| 146 InitLogging(NULL, |
| 147 LOG_ONLY_TO_SYSTEM_DEBUG_LOG, |
| 148 DONT_LOCK_LOG_FILE, |
| 149 DELETE_OLD_LOG_FILE); |
146 s_system_log.Initialize(my_path.BaseName().value().c_str()); | 150 s_system_log.Initialize(my_path.BaseName().value().c_str()); |
147 KernelCollector kernel_collector; | 151 KernelCollector kernel_collector; |
148 kernel_collector.Initialize(CountKernelCrash, | 152 kernel_collector.Initialize(CountKernelCrash, |
149 IsFeedbackAllowed, | 153 IsFeedbackAllowed, |
150 &s_system_log); | 154 &s_system_log); |
151 UserCollector user_collector; | 155 UserCollector user_collector; |
152 user_collector.Initialize(CountUserCrash, | 156 user_collector.Initialize(CountUserCrash, |
153 my_path.value(), | 157 my_path.value(), |
154 IsFeedbackAllowed, | 158 IsFeedbackAllowed, |
155 &s_system_log, | 159 &s_system_log, |
(...skipping 10 matching lines...) Expand all Loading... |
166 } | 170 } |
167 | 171 |
168 if (FLAGS_clean_shutdown) { | 172 if (FLAGS_clean_shutdown) { |
169 unclean_shutdown_collector.Disable(); | 173 unclean_shutdown_collector.Disable(); |
170 user_collector.Disable(); | 174 user_collector.Disable(); |
171 return 0; | 175 return 0; |
172 } | 176 } |
173 | 177 |
174 return HandleUserCrash(&user_collector); | 178 return HandleUserCrash(&user_collector); |
175 } | 179 } |
OLD | NEW |