2 * Copyright 2012 Samsung Electronics Co., Ltd
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
8 * http://www.tizenopensource.org/license
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.
19 #ifndef __LOCKD_DEBUG_H__
20 #define __LOCKD_DEBUG_H__
29 #define LOG_TAG "starter"
31 #define ENABLE_LOG_SYSTEM
33 void lockd_log_t(char *fmt, ...);
35 #ifdef ENABLE_LOG_SYSTEM
36 #define STARTER_ERR(fmt, arg...) LOGE("["LOG_TAG"%s:%d:E] "fmt, __FILE__, __LINE__, ##arg)
37 #define STARTER_DBG(fmt, arg...) LOGD("["LOG_TAG"%s:%d:D] "fmt, __FILE__, __LINE__, ##arg)
39 #define STARTER_ERR(fmt, arg...)
40 #define STARTER_DBG(fmt, arg...)
43 #ifdef ENABLE_LOG_SYSTEM
44 #define _ERR(fmt, arg...) do { STARTER_ERR(fmt, ##arg); lockd_log_t("["LOG_TAG":%d:E] "fmt, __LINE__, ##arg); } while (0)
45 #define _DBG(fmt, arg...) do { STARTER_DBG(fmt, ##arg); lockd_log_t("["LOG_TAG":%d:D] "fmt, __LINE__, ##arg); } while (0)
47 #define LOCKD_ERR(fmt, arg...) _ERR(fmt, ##arg)
48 #define LOCKD_DBG(fmt, arg...) _DBG(fmt, ##arg)
53 #define LOCKD_ERR(...)
54 #define LOCKD_ERR(...)
64 #endif /* __LOCKD_DEBUG_H__ */