[DA Patch]Change the _ws_flush
[platform/core/connectivity/wifi-direct-manager.git] / include / wifi-direct-log.h
1 /*
2  * Network Configuration Module
3  *
4  * Copyright (c) 2012 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
20 /**
21  * This file declares macros for logging.
22  *
23  * @file        wifi-direct-log.h
24  * @author      Nishant Chaprana (n.chaprana@samsung.com)
25  * @version     0.1
26  */
27
28 #ifndef __WIFI_DIRECT_LOG_H__
29 #define __WIFI_DIRECT_LOG_H__
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34
35 #ifdef USE_DLOG
36 #include <dlog.h>
37
38 #undef LOG_TAG
39 #define LOG_TAG "WIFI_DIRECT_MANAGER"
40
41 #define WDS_LOGV(format, args...) LOGV(format, ##args)
42 #define WDS_LOGD(format, args...) LOGD(format, ##args)
43 #define WDS_LOGI(format, args...) LOGI(format, ##args)
44 #define WDS_LOGW(format, args...) LOGW(format, ##args)
45 #define WDS_LOGE(format, args...) LOGE(format, ##args)
46 #define WDS_LOGF(format, args...) LOGF(format, ##args)
47
48 #define __WDS_LOG_FUNC_ENTER__ LOGD("Enter")
49 #define __WDS_LOG_FUNC_EXIT__ LOGD("Quit")
50
51 #define WDS_SECLOGI(format, args...) SECURE_LOG(LOG_INFO, LOG_TAG, format, ##args)
52 #define WDS_SECLOGD(format, args...) SECURE_LOG(LOG_DEBUG, LOG_TAG, format, ##args)
53
54 #else /* USE_DLOG */
55
56 #define WDS_LOGV(format, args...)
57 #define WDS_LOGD(format, args...)
58 #define WDS_LOGI(format, args...)
59 #define WDS_LOGW(format, args...)
60 #define WDS_LOGE(format, args...)
61 #define WDS_LOGF(format, args...)
62
63 #define __WDS_LOG_FUNC_ENTER__
64 #define __WDS_LOG_FUNC_EXIT__
65
66 #define WDS_SECLOGI(format, args...)
67 #define WDS_SECLOGD(format, args...)
68
69 #endif /* USE_DLOG */
70
71 #ifdef __cplusplus
72 }
73 #endif
74
75 #endif /* __WIFI_DIRECT_LOG_H__ */