OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 #include <time.h> | 31 #include <time.h> |
32 #include <limits.h> | 32 #include <limits.h> |
33 | 33 |
34 #include <algorithm> | 34 #include <algorithm> |
35 #include <iomanip> | 35 #include <iomanip> |
36 #include <ostream> | 36 #include <ostream> |
37 #include <vector> | 37 #include <vector> |
38 | 38 |
39 #include "webrtc/base/logging.h" | 39 #include "webrtc/base/logging.h" |
| 40 #include "webrtc/base/platform_thread.h" |
40 #include "webrtc/base/scoped_ptr.h" | 41 #include "webrtc/base/scoped_ptr.h" |
41 #include "webrtc/base/stringencode.h" | 42 #include "webrtc/base/stringencode.h" |
42 #include "webrtc/base/stringutils.h" | 43 #include "webrtc/base/stringutils.h" |
43 #include "webrtc/base/timeutils.h" | 44 #include "webrtc/base/timeutils.h" |
44 | 45 |
45 namespace rtc { | 46 namespace rtc { |
46 | 47 |
47 ///////////////////////////////////////////////////////////////////////////// | 48 ///////////////////////////////////////////////////////////////////////////// |
48 // Constant Labels | 49 // Constant Labels |
49 ///////////////////////////////////////////////////////////////////////////// | 50 ///////////////////////////////////////////////////////////////////////////// |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 uint32 time = TimeSince(LogStartTime()); | 105 uint32 time = TimeSince(LogStartTime()); |
105 // Also ensure WallClockStartTime is initialized, so that it matches | 106 // Also ensure WallClockStartTime is initialized, so that it matches |
106 // LogStartTime. | 107 // LogStartTime. |
107 WallClockStartTime(); | 108 WallClockStartTime(); |
108 print_stream_ << "[" << std::setfill('0') << std::setw(3) << (time / 1000) | 109 print_stream_ << "[" << std::setfill('0') << std::setw(3) << (time / 1000) |
109 << ":" << std::setw(3) << (time % 1000) << std::setfill(' ') | 110 << ":" << std::setw(3) << (time % 1000) << std::setfill(' ') |
110 << "] "; | 111 << "] "; |
111 } | 112 } |
112 | 113 |
113 if (thread_) { | 114 if (thread_) { |
114 #if defined(WEBRTC_WIN) | 115 PlatformThreadId id = CurrentThreadId(); |
115 DWORD id = GetCurrentThreadId(); | 116 print_stream_ << "[" << std::dec << id << "] "; |
116 print_stream_ << "[" << std::hex << id << std::dec << "] "; | |
117 #endif // WEBRTC_WIN | |
118 } | 117 } |
119 | 118 |
120 if (err_ctx != ERRCTX_NONE) { | 119 if (err_ctx != ERRCTX_NONE) { |
121 std::ostringstream tmp; | 120 std::ostringstream tmp; |
122 tmp << "[0x" << std::setfill('0') << std::hex << std::setw(8) << err << "]"; | 121 tmp << "[0x" << std::setfill('0') << std::hex << std::setw(8) << err << "]"; |
123 switch (err_ctx) { | 122 switch (err_ctx) { |
124 case ERRCTX_ERRNO: | 123 case ERRCTX_ERRNO: |
125 tmp << " " << strerror(err); | 124 tmp << " " << strerror(err); |
126 break; | 125 break; |
127 #if WEBRTC_WIN | 126 #if WEBRTC_WIN |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 } | 522 } |
524 | 523 |
525 if (state) { | 524 if (state) { |
526 state->unprintable_count_[input] = consecutive_unprintable; | 525 state->unprintable_count_[input] = consecutive_unprintable; |
527 } | 526 } |
528 } | 527 } |
529 | 528 |
530 ////////////////////////////////////////////////////////////////////// | 529 ////////////////////////////////////////////////////////////////////// |
531 | 530 |
532 } // namespace rtc | 531 } // namespace rtc |
OLD | NEW |