libgdbus: Add common internal apis for gdbus
[platform/core/system/libsyscommon.git] / src / shared / log-macro.h
1 /*
2  * deviced
3  *
4  * Copyright (c) 2012 - 2013 Samsung Electronics Co., Ltd.
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 #ifndef __LOG_MACRO_H__
21 #define __LOG_MACRO_H__
22
23 #ifdef ENABLE_DLOG
24 #include <dlog.h>
25 #define _D(fmt, arg...) \
26         do { SLOGD(fmt, ##arg); } while (0)
27 #define _I(fmt, arg...) \
28         do { SLOGI(fmt, ##arg); } while (0)
29 #define _W(fmt, arg...) \
30         do { SLOGW(fmt, ##arg); } while (0)
31 #define _E(fmt, arg...) \
32         do { SLOGE(fmt, ##arg); } while (0)
33 #define _SD(fmt, arg...) \
34         do { SECURE_SLOGD(fmt, ##arg); } while (0)
35 #define _SI(fmt, arg...) \
36         do { SECURE_SLOGI(fmt, ##arg); } while (0)
37 #define _SW(fmt, arg...) \
38         do { SECURE_SLOGW(fmt, ##arg); } while (0)
39 #define _SE(fmt, arg...) \
40         do { SECURE_SLOGE(fmt, ##arg); } while (0)
41 #else
42 #define _D(...)  do { } while (0)
43 #define _I(...)  do { } while (0)
44 #define _W(...)  do { } while (0)
45 #define _E(...)  do { } while (0)
46 #define _SD(...)   do { } while (0)
47 #define _SI(...)   do { } while (0)
48 #define _SW(...)   do { } while (0)
49 #define _SE(...)   do { } while (0)
50 #endif
51 #endif