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.
17 #ifndef __LOCKD_DEBUG_H__
18 #define __LOCKD_DEBUG_H__
27 #define LOG_TAG "starter"
29 #define ENABLE_LOG_SYSTEM
31 void lockd_log_t(char *fmt, ...);
33 #ifdef ENABLE_LOG_SYSTEM
34 #define STARTER_ERR(fmt, arg...) LOGE("["LOG_TAG"%s:%d:E] "fmt, __FILE__, __LINE__, ##arg)
35 #define STARTER_DBG(fmt, arg...) LOGD("["LOG_TAG"%s:%d:D] "fmt, __FILE__, __LINE__, ##arg)
37 #define STARTER_ERR(fmt, arg...)
38 #define STARTER_DBG(fmt, arg...)
41 #ifdef ENABLE_LOG_SYSTEM
42 #define _ERR(fmt, arg...) do { STARTER_ERR(fmt, ##arg); lockd_log_t("["LOG_TAG":%d:E] "fmt, __LINE__, ##arg); } while (0)
43 #define _DBG(fmt, arg...) do { STARTER_DBG(fmt, ##arg); lockd_log_t("["LOG_TAG":%d:D] "fmt, __LINE__, ##arg); } while (0)
45 #define LOCKD_ERR(fmt, arg...) _ERR(fmt, ##arg)
46 #define LOCKD_DBG(fmt, arg...) _DBG(fmt, ##arg)
51 #define LOCKD_ERR(...)
52 #define LOCKD_ERR(...)
62 #endif /* __LOCKD_DEBUG_H__ */