3 ** Copyright 2007, The Android Open Source Project
5 ** This file is dual licensed. It may be redistributed and/or modified
6 ** under the terms of the Apache 2.0 License OR version 2 of the GNU
7 ** General Public License.
10 #ifndef _UTILS_LOGGER_H
11 #define _UTILS_LOGGER_H
16 uint16_t len; /* length of the payload */
17 uint16_t __pad; /* no matter what, we get 2 bytes of padding */
18 int32_t pid; /* generating process's pid */
19 int32_t tid; /* generating process's tid */
20 int32_t sec; /* seconds since Epoch */
21 int32_t nsec; /* nanoseconds */
22 char msg[0]; /* the entry's payload */
25 #define LOGGER_LOG_MAIN "log_main"
26 #define LOGGER_LOG_RADIO "log_radio"
27 #define LOGGER_LOG_SYSTEM "log_system"
28 #define LOGGER_LOG_APPS "log_apps"
30 #define LOGGER_ENTRY_MAX_LEN (4*1024)
31 #define LOGGER_ENTRY_MAX_PAYLOAD (LOGGER_ENTRY_MAX_LEN - sizeof(struct logger_entry))
35 #include <sys/ioctl.h>
37 #define __LOGGERIO 0xAE
39 #define LOGGER_GET_LOG_BUF_SIZE _IO(__LOGGERIO, 1) /* size of log */
40 #define LOGGER_GET_LOG_LEN _IO(__LOGGERIO, 2) /* used log len */
41 #define LOGGER_GET_NEXT_ENTRY_LEN _IO(__LOGGERIO, 3) /* next entry len */
42 #define LOGGER_FLUSH_LOG _IO(__LOGGERIO, 4) /* flush log */
44 //#endif // HAVE_IOCTL
46 #endif /* _UTILS_LOGGER_H */