Update doxygen
[platform/core/base/bundle.git] / src / bundle_log.h
1 /*
2  * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
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 #ifndef __BUNDLE_LOG_H__
18 #define __BUNDLE_LOG_H__
19
20 #include <dlog/dlog.h>
21
22 #ifdef LOG_TAG
23 #undef LOG_TAG
24 #endif
25
26 #define LOG_TAG "BUNDLE"
27
28 #ifdef _DEBUG_MODE_
29 #define BUNDLE_LOG_PRINT(FMT, ARG...) \
30         do { \
31                 printf("%5d", getpid()); \
32                 printf("%s() : "FMT"\n", __FUNCTION__, ##ARG); \
33         } while (0)
34
35 #define BUNDLE_EXCEPTION_PRINT(FMT, ARG...) \
36         do { \
37                 printf("%5d", getpid()); \
38                 printf("%s() : "FMT"\n", __FUNCTION__, ##ARG); \
39         } while (0)
40
41 #define BUNDLE_ASSERT_PRINT(FMT, ARG...) \
42         do { \
43                 printf("%5d", getpid()); \
44                 printf("%s() : "FMT"\n", __FUNCTION__, ##ARG); \
45         } while (0)
46 #else
47 #define BUNDLE_LOG_PRINT(FMT, ARG...) SLOGD(FMT, ##ARG);
48 #define BUNDLE_EXCEPTION_PRINT(FMT, ARG...) SLOGW(FMT, ##ARG);
49 #define BUNDLE_ASSERT_PRINT(FMT, ARG...) SLOGE(FMT, ##ARG);
50 #endif /* _DEBUG_MODE_ */
51
52 #endif /* __BUNDLE_LOG_H__ */