summaryrefslogtreecommitdiffstats
path: root/dbus
diff options
context:
space:
mode:
authorjbroman <jbroman@chromium.org>2016-01-21 20:49:25 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-22 04:50:35 +0000
commita14517ffd5565b7572ead4014b9953edc4b17009 (patch)
treec9a080c8e59b1edbe6acb4d4a03e5c311509cc35 /dbus
parent95773a85549dc14dbb42d665dadd7875d05df0a1 (diff)
downloadchromium_src-a14517ffd5565b7572ead4014b9953edc4b17009.zip
chromium_src-a14517ffd5565b7572ead4014b9953edc4b17009.tar.gz
chromium_src-a14517ffd5565b7572ead4014b9953edc4b17009.tar.bz2
Remove logging::LogAtLevel and rewrite its sole caller.
This method causes log statements attributed to logging.h (inside the LogAtLevel function) to be written, which is less than useful. It only has one caller, which can easily be adjusted to use the ordinary LOG(...) macro with a small adjustment. After this change, the log output is correctly attributed to object_proxy.cc. Review URL: https://codereview.chromium.org/1609563002 Cr-Commit-Position: refs/heads/master@{#370905}
Diffstat (limited to 'dbus')
-rw-r--r--dbus/object_proxy.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/dbus/object_proxy.cc b/dbus/object_proxy.cc
index e7d1f22..6c758b9 100644
--- a/dbus/object_proxy.cc
+++ b/dbus/object_proxy.cc
@@ -565,17 +565,19 @@ void ObjectProxy::LogMethodCallFailure(
if (ignore_service_unknown_errors_ &&
(error_name == kErrorServiceUnknown || error_name == kErrorObjectUnknown))
return;
- logging::LogSeverity severity = logging::LOG_ERROR;
- // "UnknownObject" indicates that an object or service is no longer available,
- // e.g. a Shill network service has gone out of range. Treat these as warnings
- // not errors.
- if (error_name == kErrorObjectUnknown)
- severity = logging::LOG_WARNING;
+
std::ostringstream msg;
msg << "Failed to call method: " << interface_name << "." << method_name
<< ": object_path= " << object_path_.value()
<< ": " << error_name << ": " << error_message;
- logging::LogAtLevel(severity, msg.str());
+
+ // "UnknownObject" indicates that an object or service is no longer available,
+ // e.g. a Shill network service has gone out of range. Treat these as warnings
+ // not errors.
+ if (error_name == kErrorObjectUnknown)
+ LOG(WARNING) << msg.str();
+ else
+ LOG(ERROR) << msg.str();
}
void ObjectProxy::OnCallMethodError(const std::string& interface_name,