Tom Cherry | 349b0c4 | 2020-01-08 14:47:42 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2020 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 | #pragma once |
| 18 | |
| 19 | #include <optional> |
| 20 | |
| 21 | #include <android/log.h> |
| 22 | |
| 23 | namespace android { |
| 24 | namespace base { |
| 25 | |
| 26 | struct LibLogFunctions { |
| 27 | void (*__android_log_set_logger)(__android_logger_function logger); |
| 28 | void (*__android_log_write_logger_data)(struct __android_logger_data* logger_data, |
| 29 | const char* msg); |
| 30 | |
| 31 | void (*__android_log_logd_logger)(const struct __android_logger_data* logger_data, |
| 32 | const char* msg); |
| 33 | void (*__android_log_stderr_logger)(const struct __android_logger_data* logger_data, |
| 34 | const char* message); |
| 35 | |
| 36 | void (*__android_log_set_aborter)(__android_aborter_function aborter); |
| 37 | void (*__android_log_call_aborter)(const char* abort_message); |
| 38 | void (*__android_log_default_aborter)(const char* abort_message); |
Tom Cherry | 0391a87 | 2020-01-16 15:58:02 -0800 | [diff] [blame] | 39 | int (*__android_log_set_minimum_priority)(int priority); |
| 40 | int (*__android_log_get_minimum_priority)(); |
Tom Cherry | 349b0c4 | 2020-01-08 14:47:42 -0800 | [diff] [blame] | 41 | }; |
| 42 | |
| 43 | const std::optional<LibLogFunctions>& GetLibLogFunctions(); |
| 44 | |
| 45 | } // namespace base |
| 46 | } // namespace android |