Change the calling order mesh_gdbus_set_mesh_gate and mesh_request_set_mesh_gate...
[platform/core/connectivity/wifi-mesh-manager.git] / include / mesh-log.h
1 /*
2  * Network Configuration Module
3  *
4  * Copyright (c) 2017 Samsung Electronics Co., Ltd. All rights reserved.
5  *
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
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
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.
17  *
18  */
19 #ifndef __MESH_LOG_H__
20 #define __MESH_LOG_H__
21
22 #ifdef USE_DLOG
23 #include <dlog.h>
24
25 #undef LOG_TAG
26 #define LOG_TAG "MESH_MANAGER"
27
28 #define MESH_LOGV(format, args...) LOGV(format, ##args)
29 #define MESH_LOGD(format, args...) LOGD(format, ##args)
30 #define MESH_LOGI(format, args...) LOGI(format, ##args)
31 #define MESH_LOGW(format, args...) LOGW(format, ##args)
32 #define MESH_LOGE(format, args...) LOGE(format, ##args)
33 #define MESH_LOGF(format, args...) LOGF(format, ##args)
34
35 #define __MESH_LOG_FUNC_ENTER__ LOGD("Enter")
36 #define __MESH_LOG_FUNC_EXIT__ LOGD("Quit")
37
38 #define MESH_SECLOGI(format, args...) SECURE_LOG(LOG_INFO, LOG_TAG, format, ##args)
39 #define MESH_SECLOGD(format, args...) SECURE_LOG(LOG_DEBUG, LOG_TAG, format, ##args)
40
41 #else /* USE_DLOG */
42
43 #define MESH_LOGV(format, args...)
44 #define MESH_LOGD(format, args...)
45 #define MESH_LOGI(format, args...)
46 #define MESH_LOGW(format, args...)
47 #define MESH_LOGE(format, args...)
48 #define MESH_LOGF(format, args...)
49
50 #define __MESH_LOG_FUNC_ENTER__
51 #define __MESH_LOG_FUNC_EXIT__
52
53 #define MESH_SECLOGI(format, args...)
54 #define MESH_SECLOGD(format, args...)
55
56 #endif /* USE_DLOG */
57
58 #endif /* __MESH_LOG_H__ */