3 * Copyright (c) 2005-2008, The Android Open Source Project
4 * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
6 * Licensed under the Apache License, Version 2.0 (the License);
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
19 #ifndef _UTILS_LOGGER_H
20 #define _UTILS_LOGGER_H
25 uint16_t len; /* length of the payload */
26 uint16_t __pad; /* no matter what, we get 2 bytes of padding */
27 int32_t pid; /* generating process's pid */
28 int32_t tid; /* generating process's tid */
29 int32_t sec; /* seconds since Epoch */
30 int32_t nsec; /* nanoseconds */
31 char msg[0]; /* the entry's payload */
34 #define LOGGER_LOG_MAIN "log_main"
35 #define LOGGER_LOG_RADIO "log_radio"
36 #define LOGGER_LOG_SYSTEM "log_system"
37 #define LOGGER_LOG_APPS "log_apps"
39 #define LOGGER_ENTRY_MAX_LEN (4*1024)
40 #define LOGGER_ENTRY_MAX_PAYLOAD (LOGGER_ENTRY_MAX_LEN - sizeof(struct logger_entry))
44 #include <sys/ioctl.h>
46 #define __LOGGERIO 0xAE
48 #define LOGGER_GET_LOG_BUF_SIZE _IO(__LOGGERIO, 1) /* size of log */
49 #define LOGGER_GET_LOG_LEN _IO(__LOGGERIO, 2) /* used log len */
50 #define LOGGER_GET_NEXT_ENTRY_LEN _IO(__LOGGERIO, 3) /* next entry len */
51 #define LOGGER_FLUSH_LOG _IO(__LOGGERIO, 4) /* flush log */
53 //#endif // HAVE_IOCTL
55 #endif /* _UTILS_LOGGER_H */