tizen beta release
[framework/location/libslp-lbs-plugin-replay.git] / replay-plugin / include / gps_plugin_debug.h
1 /*
2  * GPS manager replay plugin
3  *
4  * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Youngae Kang <youngae.kang@samsung.com>, Yunhan Kim <yhan.kim@samsung.com>,
7  *          Genie Kim <daejins.kim@samsung.com>, Minjune Kim <sena06.kim@samsung.com>
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21
22 #ifndef __GPS_PLUGIN_DEBUG_H__
23 #define __GPS_PLUGIN_DEBUG_H__
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 #define GPS_DLOG
30 #define GPS_DLOG_DEBUG          // filename and line number will be shown
31
32 #ifdef GPS_DLOG
33 #include <dlog.h>
34 #define TAG_GPS_PLUGIN      "gps-plugin"
35
36 #define DBG_LOW         LOG_DEBUG
37 #define DBG_INFO        LOG_INFO
38 #define DBG_WARN        LOG_WARN
39 #define DBG_ERR         LOG_ERROR
40
41 #ifdef GPS_DLOG_DEBUG           // Debug mode
42 #define LOG_PLUGIN(dbg_lvl,fmt,args...)  SLOG(dbg_lvl, TAG_GPS_PLUGIN, "[%-40s: %-4d] "fmt, __FILE__, __LINE__, ##args)
43 #else                           // Release(commercial) mode
44 #define LOG_PLUGIN(dbg_lvl,fmt,args...)  SLOG(dbg_lvl, TAG_GPS_PLUGIN, fmt, ##args)
45 #endif
46 #endif
47
48 #ifdef __cplusplus
49 }
50 #endif
51 #endif