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

Side by Side Diff: net/quic/platform/impl/quic_logging_impl.h

Issue 2611613003: Add quic_logging (Closed)
Patch Set: keep LOG rather than all DLOG Created 3 years, 11 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
« no previous file with comments | « net/quic/platform/api/quic_logging.h ('k') | net/quic/test_tools/crypto_test_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef NET_QUIC_PLATFORM_IMPL_QUIC_LOGGING_IMPL_H_
6 #define NET_QUIC_PLATFORM_IMPL_QUIC_LOGGING_IMPL_H_
7
8 #include "base/logging.h"
9
10 #define QUIC_LOG_IMPL(severity) QUIC_CHROMIUM_LOG_##severity
11 #define QUIC_LOG_EVERY_N_SEC_IMPL(severity, seconds) QUIC_LOG_IMPL(severity)
12 #define QUIC_LOG_FIRST_N_IMPL(severity, n) QUIC_LOG_IMPL(severity)
13 #define QUIC_DLOG_IMPL(severity) QUIC_CHROMIUM_DLOG_##severity
14 #define QUIC_LOG_IF_IMPL(severity, condition) \
15 QUIC_CHROMIUM_LOG_IF_##severity(condition)
16
17 #define QUIC_CHROMIUM_LOG_INFO VLOG(1)
18 #define QUIC_CHROMIUM_LOG_WARNING LOG(WARNING)
19 #define QUIC_CHROMIUM_LOG_ERROR LOG(ERROR)
Ryan Hamilton 2017/01/10 20:37:06 I suspect we want both of these to be DLOG so as t
Ryan Hamilton 2017/01/10 22:49:20 Correct.
20 #define QUIC_CHROMIUM_LOG_FATAL LOG(FATAL)
21 #define QUIC_CHROMIUM_LOG_DFATAL LOG(DFATAL)
22
23 #define QUIC_CHROMIUM_DLOG_INFO DVLOG(1)
24 #define QUIC_CHROMIUM_DLOG_WARNING DLOG(WARNING)
25 #define QUIC_CHROMIUM_DLOG_ERROR DLOG(ERROR)
26 #define QUIC_CHROMIUM_DLOG_FATAL DLOG(FATAL)
27 #define QUIC_CHROMIUM_DLOG_DFATAL DLOG(DFATAL)
28
29 #define QUIC_CHROMIUM_LOG_IF_INFO(condition) VLOG_IF(1, condition)
30 #define QUIC_CHROMIUM_LOG_IF_WARNING(condition) LOG_IF(WARNING, condition)
31 #define QUIC_CHROMIUM_LOG_IF_ERROR(condition) LOG_IF(ERROR, condition)
32 #define QUIC_CHROMIUM_LOG_IF_FATAL(condition) LOG_IF(FATAL, condition)
33 #define QUIC_CHROMIUM_LOG_IF_DFATAL(condition) LOG_IF(DFATAL, condition)
34
35 #define QUIC_DVLOG_IMPL(verbose_level) DVLOG(verbose_level)
36
37 #if defined(OS_WIN)
38 // wingdi.h defines ERROR to be 0. When we call QUIC_DLOG(ERROR), it gets
39 // substituted with 0, and it expands to QUIC_CHROMIUM_DLOG_0. To allow us to
40 // keep using this syntax, we define this macro to do the same thing as
41 // QUIC_CHROMIUM_DLOG_ERROR.
42 #define QUIC_CHROMIUM_LOG_0 QUIC_CHROMIUM_LOG_ERROR
43 #define QUIC_CHROMIUM_DLOG_0 QUIC_CHROMIUM_DLOG_ERROR
44 #define QUIC_CHROMIUM_LOG_IF_0 QUIC_CHROMIUM_LOG_IF_ERROR
45 #endif
46
47 #endif // NET_QUIC_PLATFORM_IMPL_QUIC_LOGGING_IMPL_H_
OLDNEW
« no previous file with comments | « net/quic/platform/api/quic_logging.h ('k') | net/quic/test_tools/crypto_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698