libchromeos: Add error location informaion to chromeos::Error
The error information logged always appears to come from error.cc
file in libchormeos since that's where LOG(ERROR) statement is.
Added the ability to pass in the actual source of the error by
using tracked_objects::Location parameter and "FROM_HERE" macros
used in base::TaskRunner-based classes.
While all the system log messages looked like this:
[ERROR:error.cc(15)] Domain=peerd, Code=service.info, Message=Invalid service key.
Now they appear as this:
ERROR:service.cc(155)] IsValidServiceInfo(...): Domain=peerd, Code=service.info, Message=Invalid service key.
We report the actual source file and line number where the error is
coming from, as well as the function name.
BUG=None
TEST=FEATURES=test emerge-link libchromeos buffet lorgnette peerd privetd
Change-Id: I647997c24d61a03f3b481e4c9ca336c90e99e9a3
Reviewed-on: https://chromium-review.googlesource.com/229071
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
11 files changed
tree: 95f9c3dd6561d557a3355375f098eccaf729cc50
- buffet/