Code sync
[apps/native/starter.git] / lock-setting / lockapp-setting / include / openlock-setting-debug.h
1  /*
2   * Copyright 2012  Samsung Electronics Co., Ltd
3   *
4   * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
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
18
19 #ifndef __OPENLOCK_SETTING_DEBUG_H__
20 #define __OPENLOCK_SETTING_DEBUG_H__
21
22 #include <stdio.h>
23
24 #define OPENLOCK_USING_PLATFORM_DEBUG
25
26 #ifdef OPENLOCK_USING_PLATFORM_DEBUG
27 #ifndef LOG_TAG
28 #define LOG_TAG "openlock-setting"
29 #endif
30 #include <dlog.h>
31
32 #define OPENLOCKS_DBG(fmt, args...) LOGD("["LOG_TAG"%s:%d:E] "fmt, __FILE__, __LINE__, ##args)
33 #define OPENLOCKS_WARN(fmt, args...) LOGW("["LOG_TAG"%s:%d:E] "fmt, __FILE__, __LINE__, ##args)
34 #define OPENLOCKS_ERR(fmt, args...) LOGE("["LOG_TAG"%s:%d:E] "fmt, __FILE__, __LINE__, ##args)
35 #else
36 #define OPENLOCKS_DBG(fmt, args...) do{printf("[OPENLOCKS_DBG][%s(%d)] "fmt " \n", __FILE__, __LINE__, ##args);}while(0);
37 #define OPENLOCKS_WARN(fmt, args...) do{printf("[OPENLOCKS_WARN][%s(%d)] "fmt " \n", __FILE__, __LINE__, ##args);}while(0);
38 #define OPENLOCKS_ERR(fmt, args...) do{printf("[OPENLOCKS_ERR][%s(%d)] "fmt " \n", __FILE__, __LINE__, ##args);}while(0);
39 #endif                          /* LOCKD_USING_PLATFORM_DEBUG */
40
41 #ifndef TRUE
42 #define TRUE 1
43 #endif
44 #ifndef FALSE
45 #define FALSE 0
46 #endif
47
48 #endif                          /* __OPENLOCK_SETTING_DEBUG_H__ */