1 // Copyright (C) 2017 The Android Open Source Project 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 #ifndef _LIBS_LOG_TRANSPORT_H 16 #define _LIBS_LOG_TRANSPORT_H 17 18 #ifdef __cplusplus 19 extern "C" { 20 #endif 21 22 /* 23 * Logging transports, bit mask to select features. Function returns selection. 24 */ 25 /* clang-format off */ 26 #define LOGGER_DEFAULT 0x00 27 #define LOGGER_LOGD 0x01 28 #define LOGGER_KERNEL 0x02 /* Reserved/Deprecated */ 29 #define LOGGER_NULL 0x04 /* Does not release resources of other selections */ 30 #define LOGGER_LOCAL 0x08 /* logs sent to local memory */ 31 #define LOGGER_STDERR 0x10 /* logs sent to stderr */ 32 /* clang-format on */ 33 34 /* Both return the selected transport flag mask, or negative errno */ 35 int android_set_log_transport(int transport_flag); 36 int android_get_log_transport(); 37 38 #ifdef __cplusplus 39 } 40 #endif 41 42 #endif /* _LIBS_LOG_TRANSPORT_H */ 43