shill; Create Error::LogMessage utility routine

This combines a LOG(ERROR) with an error->Populate().  It has
the downside of having the error originate from error.cc, as
opposed to the orignal call site of the error, so readers of
the log need to rely on the content of the error message to
tell where the error came from.

BUG=chromium-os:22426
TEST=Rerun unit tests, look at all error messages

Change-Id: I9ccd5385db7c4eda34eb242abd02c57c899d161c
Reviewed-on: https://gerrit.chromium.org/gerrit/11098
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
diff --git a/error.cc b/error.cc
index e486bb5..5ab022e 100644
--- a/error.cc
+++ b/error.cc
@@ -86,4 +86,12 @@
   return kInfos[type].message;
 }
 
+// static
+void Error::PopulateAndLog(Error *error, Type type, const string &message) {
+  LOG(ERROR) << message;
+  if (error) {
+    error->Populate(type, message);
+  }
+}
+
 }  // namespace shill