Stop using LOG macros in favor of RTC_ prefixed macros.
This CL has been generated with the following script:
for m in PLOG \
LOG_TAG \
LOG_GLEM \
LOG_GLE_EX \
LOG_GLE \
LAST_SYSTEM_ERROR \
LOG_ERRNO_EX \
LOG_ERRNO \
LOG_ERR_EX \
LOG_ERR \
LOG_V \
LOG_F \
LOG_T_F \
LOG_E \
LOG_T \
LOG_CHECK_LEVEL_V \
LOG_CHECK_LEVEL \
LOG
do
git grep -l $m | xargs sed -i "s,\b$m\b,RTC_$m,g"
done
git checkout rtc_base/logging.h
git cl format
Bug: webrtc:8452
Change-Id: I1a53ef3e0a5ef6e244e62b2e012b864914784600
Reviewed-on: https://webrtc-review.googlesource.com/21325
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20617}
diff --git a/rtc_base/httpcommon.cc b/rtc_base/httpcommon.cc
index b2e4869..7667faf 100644
--- a/rtc_base/httpcommon.cc
+++ b/rtc_base/httpcommon.cc
@@ -652,7 +652,7 @@
// This server's response has no version. :( NOTE: This happens for every
// response to requests made from Chrome plugins, regardless of the server's
// behaviour.
- LOG(LS_VERBOSE) << "HTTP version missing from response";
+ RTC_LOG(LS_VERBOSE) << "HTTP version missing from response";
version = HVER_UNKNOWN;
} else if ((sscanf(line, "HTTP/%u.%u %u%n",
&vmajor, &vminor, &temp_scode, &temp_pos) == 3)
@@ -828,7 +828,7 @@
if (DsMakeSpn("HTTP", server.HostAsURIString().c_str(), nullptr,
server.port(),
0, &len, spn) != ERROR_SUCCESS) {
- LOG_F(WARNING) << "(Negotiate) - DsMakeSpn failed";
+ RTC_LOG_F(WARNING) << "(Negotiate) - DsMakeSpn failed";
return HAR_IGNORE;
}
#else
@@ -869,7 +869,8 @@
if (neg) {
const size_t max_steps = 10;
if (++neg->steps >= max_steps) {
- LOG(WARNING) << "AsyncHttpsProxySocket::Authenticate(Negotiate) too many retries";
+ RTC_LOG(WARNING) << "AsyncHttpsProxySocket::Authenticate(Negotiate) "
+ "too many retries";
return HAR_ERROR;
}
steps = neg->steps;
@@ -889,10 +890,11 @@
in_buf_desc.pBuffers = &in_sec;
ret = InitializeSecurityContextA(&neg->cred, &neg->ctx, spn, flags, 0, SECURITY_NATIVE_DREP, &in_buf_desc, 0, &neg->ctx, &out_buf_desc, &ret_flags, &lifetime);
- //LOG(INFO) << "$$$ InitializeSecurityContext @ " << TimeSince(now);
+ // RTC_LOG(INFO) << "$$$ InitializeSecurityContext @ " <<
+ // TimeSince(now);
if (FAILED(ret)) {
- LOG(LS_ERROR) << "InitializeSecurityContext returned: "
- << ErrorName(ret, SECURITY_ERRORS);
+ RTC_LOG(LS_ERROR) << "InitializeSecurityContext returned: "
+ << ErrorName(ret, SECURITY_ERRORS);
return HAR_ERROR;
}
} else if (neg->specified_credentials) {
@@ -946,19 +948,20 @@
auth_id.Password = passbuf;
auth_id.Flags = SEC_WINNT_AUTH_IDENTITY_ANSI;
pauth_id = &auth_id;
- LOG(LS_VERBOSE) << "Negotiate protocol: Using specified credentials";
+ RTC_LOG(LS_VERBOSE)
+ << "Negotiate protocol: Using specified credentials";
} else {
- LOG(LS_VERBOSE) << "Negotiate protocol: Using default credentials";
+ RTC_LOG(LS_VERBOSE) << "Negotiate protocol: Using default credentials";
}
CredHandle cred;
ret = AcquireCredentialsHandleA(
0, const_cast<char*>(want_negotiate ? NEGOSSP_NAME_A : NTLMSP_NAME_A),
SECPKG_CRED_OUTBOUND, 0, pauth_id, 0, 0, &cred, &lifetime);
- //LOG(INFO) << "$$$ AcquireCredentialsHandle @ " << TimeSince(now);
+ // RTC_LOG(INFO) << "$$$ AcquireCredentialsHandle @ " << TimeSince(now);
if (ret != SEC_E_OK) {
- LOG(LS_ERROR) << "AcquireCredentialsHandle error: "
- << ErrorName(ret, SECURITY_ERRORS);
+ RTC_LOG(LS_ERROR) << "AcquireCredentialsHandle error: "
+ << ErrorName(ret, SECURITY_ERRORS);
return HAR_IGNORE;
}
@@ -966,10 +969,10 @@
CtxtHandle ctx;
ret = InitializeSecurityContextA(&cred, 0, spn, flags, 0, SECURITY_NATIVE_DREP, 0, 0, &ctx, &out_buf_desc, &ret_flags, &lifetime);
- //LOG(INFO) << "$$$ InitializeSecurityContext @ " << TimeSince(now);
+ // RTC_LOG(INFO) << "$$$ InitializeSecurityContext @ " << TimeSince(now);
if (FAILED(ret)) {
- LOG(LS_ERROR) << "InitializeSecurityContext returned: "
- << ErrorName(ret, SECURITY_ERRORS);
+ RTC_LOG(LS_ERROR) << "InitializeSecurityContext returned: "
+ << ErrorName(ret, SECURITY_ERRORS);
FreeCredentialsHandle(&cred);
return HAR_IGNORE;
}
@@ -982,15 +985,15 @@
if ((ret == SEC_I_COMPLETE_NEEDED) || (ret == SEC_I_COMPLETE_AND_CONTINUE)) {
ret = CompleteAuthToken(&neg->ctx, &out_buf_desc);
- //LOG(INFO) << "$$$ CompleteAuthToken @ " << TimeSince(now);
- LOG(LS_VERBOSE) << "CompleteAuthToken returned: "
- << ErrorName(ret, SECURITY_ERRORS);
+ // RTC_LOG(INFO) << "$$$ CompleteAuthToken @ " << TimeSince(now);
+ RTC_LOG(LS_VERBOSE) << "CompleteAuthToken returned: "
+ << ErrorName(ret, SECURITY_ERRORS);
if (FAILED(ret)) {
return HAR_ERROR;
}
}
- //LOG(INFO) << "$$$ NEGOTIATE took " << TimeSince(now) << "ms";
+ // RTC_LOG(INFO) << "$$$ NEGOTIATE took " << TimeSince(now) << "ms";
std::string decoded(out_buf, out_buf + out_sec.cbBuffer);
response = auth_method;