diff options
author | Mark Salyzyn | 2015-01-16 15:38:07 -0600 |
---|---|---|
committer | Mark Salyzyn | 2015-01-23 17:32:11 -0600 |
commit | b5f6e45d6bddd2f6262bf387c3314dc744896320 (patch) | |
tree | 6b866998680afb3dde2db6b1f9d8e2e57852b73c /include/private/android_logger.h | |
parent | 2c7f05d88c3d59eea5ce82a4762cf3c6477565c7 (diff) | |
download | platform-system-core-b5f6e45d6bddd2f6262bf387c3314dc744896320.tar.gz platform-system-core-b5f6e45d6bddd2f6262bf387c3314dc744896320.tar.xz platform-system-core-b5f6e45d6bddd2f6262bf387c3314dc744896320.zip |
logd: create private/android_logger.h
- create a structure to depict the private header
expected at logd end of socket.
- utilize this new structure instead of unscalable
byte stream technique used to unpack in logd.
Change-Id: I2d0e5c3531c279f2dc1fbd74807210ff8d804de0
Diffstat (limited to 'include/private/android_logger.h')
-rw-r--r-- | include/private/android_logger.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/include/private/android_logger.h b/include/private/android_logger.h new file mode 100644 index 000000000..54aa86b41 --- /dev/null +++ b/include/private/android_logger.h | |||
@@ -0,0 +1,34 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2015 The Android Open Source Project | ||
3 | * | ||
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | * you may not use this file except in compliance with the License. | ||
6 | * You may obtain a copy of the License at | ||
7 | * | ||
8 | * http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | * | ||
10 | * Unless required by applicable law or agreed to in writing, software | ||
11 | * distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | * See the License for the specific language governing permissions and | ||
14 | * limitations under the License. | ||
15 | */ | ||
16 | |||
17 | /* This file is used to define the internal protocol for the Android Logger */ | ||
18 | |||
19 | #ifndef _SYSTEM_CORE_INCLUDE_PRIVATE_ANDROID_LOGGER_H_ | ||
20 | #define _SYSTEM_CORE_INCLUDE_PRIVATE_ANDROID_LOGGER_H_ | ||
21 | |||
22 | #include <stdint.h> | ||
23 | |||
24 | #include <log/log.h> | ||
25 | #include <log/log_read.h> | ||
26 | |||
27 | /* Header Structure to logd */ | ||
28 | typedef struct __attribute__((__packed__)) { | ||
29 | typeof_log_id_t id; | ||
30 | uint16_t tid; | ||
31 | log_time realtime; | ||
32 | } android_log_header_t; | ||
33 | |||
34 | #endif | ||