• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 Huawei Device Co., Ltd.
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 
16 #ifndef NETNATIVE_LOG_WRAPPER_H
17 #define NETNATIVE_LOG_WRAPPER_H
18 
19 #include "netmanager_base_log.h"
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 #undef LOG_TAG
26 #ifndef NETMGR_LOG_TAG
27 #define LOG_TAG "NetsysNativeService"
28 #else
29 #define LOG_TAG NETMGR_LOG_TAG
30 #endif
31 
32 #define NETNATIVE_LOG_D(fmt, ...) NETMANAGER_LOG(DEBUG, fmt, ##__VA_ARGS__)
33 #define NETNATIVE_LOGE(fmt, ...) NETMANAGER_LOG(ERROR, fmt, ##__VA_ARGS__)
34 #define NETNATIVE_LOGW(fmt, ...) NETMANAGER_LOG(WARN, fmt, ##__VA_ARGS__)
35 #define NETNATIVE_LOGI(fmt, ...) NETMANAGER_LOG(INFO, fmt, ##__VA_ARGS__)
36 #define NETNATIVE_LOGF(fmt, ...) NETMANAGER_LOG(FATAL, fmt, ##__VA_ARGS__)
37 
38 #if DNS_CONFIG_DEBUG
39 #define DNS_CONFIG_PRINT(fmt, ...) NETMANAGER_LOG(INFO, fmt, ##__VA_ARGS__)
40 #else
41 #define DNS_CONFIG_PRINT(fmt, ...) ((void)(0, ##__VA_ARGS__))
42 #endif
43 
44 #ifdef __cplusplus
45 }
46 #endif
47 
48 #endif // NETNATIVE_LOG_WRAPPER_H
49