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 "chrome/test/logging/win/log_file_printer.h" | 5 #include "chrome/test/logging/win/log_file_printer.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <objbase.h> | 8 #include <objbase.h> |
9 | 9 |
10 #include <iomanip> | 10 #include <iomanip> |
(...skipping 20 matching lines...) Expand all Loading... |
31 switch (severity) { | 31 switch (severity) { |
32 case logging::LOG_INFO: | 32 case logging::LOG_INFO: |
33 *out << "INFO"; | 33 *out << "INFO"; |
34 break; | 34 break; |
35 case logging::LOG_WARNING: | 35 case logging::LOG_WARNING: |
36 *out << "WARNING"; | 36 *out << "WARNING"; |
37 break; | 37 break; |
38 case logging::LOG_ERROR: | 38 case logging::LOG_ERROR: |
39 *out << "ERROR"; | 39 *out << "ERROR"; |
40 break; | 40 break; |
41 case logging::LOG_ERROR_REPORT: | |
42 *out << "ERROR_REPORT"; | |
43 break; | |
44 case logging::LOG_FATAL: | 41 case logging::LOG_FATAL: |
45 *out << "FATAL"; | 42 *out << "FATAL"; |
46 break; | 43 break; |
47 default: | 44 default: |
48 if (severity < 0) | 45 if (severity < 0) |
49 *out << "VERBOSE" << -severity; | 46 *out << "VERBOSE" << -severity; |
50 else | 47 else |
51 NOTREACHED(); | 48 NOTREACHED(); |
52 break; | 49 break; |
53 } | 50 } |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 << std::endl; | 237 << std::endl; |
241 } | 238 } |
242 | 239 |
243 } // namespace | 240 } // namespace |
244 | 241 |
245 void logging_win::PrintLogFile(const base::FilePath& log_file, | 242 void logging_win::PrintLogFile(const base::FilePath& log_file, |
246 std::ostream* out) { | 243 std::ostream* out) { |
247 EventPrinter printer(out); | 244 EventPrinter printer(out); |
248 logging_win::ReadLogFile(log_file, &printer); | 245 logging_win::ReadLogFile(log_file, &printer); |
249 } | 246 } |
OLD | NEW |