summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2014-02-20 14:59:07 -0800
committerMark Salyzyn <salyzyn@google.com>2014-02-28 13:49:11 -0800
commit154f4608aac6218af0e25c98b71d0803278c047e (patch)
treed324e05b44b362cbc0a95033ad1c06a0438bd523 /include
parent1114f1806521b2a6447b7c68934e4f3c29b60cb5 (diff)
downloadsystem_core-154f4608aac6218af0e25c98b71d0803278c047e.zip
system_core-154f4608aac6218af0e25c98b71d0803278c047e.tar.gz
system_core-154f4608aac6218af0e25c98b71d0803278c047e.tar.bz2
liblog: enable logging to logd.
* Modify liblog to send all messages to the new syslog user space daemon. Original-Change-Id: I0ce439738cd921efb2db4c1d6a289a96bdbc8bc2 Original-Change-Id: If4eb0d09409f7e9be3eb4bb7017073dc7e931ab4 Signed-off-by: Nick Kralevich <nnk@google.com> * Add a TARGET_USES_LOGD make flag for BoardConfig.mk to manage whether logd is enabled for use or not. * rename syslog to logd to avert confusion with bionic syslog * Add fake log support back in * prefilter for logging messages from logd * Fill in timestamps at logging source * update abstract log reader * switch from using suffix for id to v3 format * log a message when creating devices that a deprecated interface is being utilized. Signed-off-by: Mark Salyzyn <salyzyn@google.com> (cherry pick from commit 099e2c1f6f706a8600c1cef74cce9066fc315480) Change-Id: I47929a5432977a1d7235267a435cec0a7d6bd440
Diffstat (limited to 'include')
-rw-r--r--include/log/logger.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/include/log/logger.h b/include/log/logger.h
index 6414d84..bea0022 100644
--- a/include/log/logger.h
+++ b/include/log/logger.h
@@ -79,14 +79,10 @@ struct logger_entry_v3 {
struct log_msg {
union {
unsigned char buf[LOGGER_ENTRY_MAX_LEN + 1];
- struct logger_entry_v2 entry;
+ struct logger_entry_v3 entry;
struct logger_entry_v3 entry_v3;
struct logger_entry_v2 entry_v2;
struct logger_entry entry_v1;
- struct {
- unsigned char buf[LOGGER_ENTRY_MAX_LEN + 1];
- log_id_t id;
- } extra;
} __attribute__((aligned(4)));
#ifdef __cplusplus
/* Matching log_time operators */
@@ -126,7 +122,7 @@ struct log_msg {
/* packet methods */
log_id_t id()
{
- return extra.id;
+ return (log_id_t) entry.lid;
}
char *msg()
{