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

Side by Side Diff: crash_reporter.cc

Issue 3390021: Revert "Add call to logging::InitLogging() during startup to write to stderr." (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crash-reporter.git
Patch Set: Created 10 years, 3 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 | Annotate | Revision Log
« 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 // 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
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);
150 s_system_log.Initialize(my_path.BaseName().value().c_str()); 146 s_system_log.Initialize(my_path.BaseName().value().c_str());
151 KernelCollector kernel_collector; 147 KernelCollector kernel_collector;
152 kernel_collector.Initialize(CountKernelCrash, 148 kernel_collector.Initialize(CountKernelCrash,
153 IsFeedbackAllowed, 149 IsFeedbackAllowed,
154 &s_system_log); 150 &s_system_log);
155 UserCollector user_collector; 151 UserCollector user_collector;
156 user_collector.Initialize(CountUserCrash, 152 user_collector.Initialize(CountUserCrash,
157 my_path.value(), 153 my_path.value(),
158 IsFeedbackAllowed, 154 IsFeedbackAllowed,
159 &s_system_log, 155 &s_system_log,
(...skipping 10 matching lines...) Expand all
170 } 166 }
171 167
172 if (FLAGS_clean_shutdown) { 168 if (FLAGS_clean_shutdown) {
173 unclean_shutdown_collector.Disable(); 169 unclean_shutdown_collector.Disable();
174 user_collector.Disable(); 170 user_collector.Disable();
175 return 0; 171 return 0;
176 } 172 }
177 173
178 return HandleUserCrash(&user_collector); 174 return HandleUserCrash(&user_collector);
179 } 175 }
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