summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSangchul Lee <sc11.lee@samsung.com>2015-01-08 14:20:50 (GMT)
committerSangchul Lee <sc11.lee@samsung.com>2015-01-08 14:21:11 (GMT)
commit6c769f64f84c1bfaa8a05d9ca9288cd13b8cb700 (patch)
tree4fd077332a578a1f03186519fc22bcfafef0ca43
parent5a1a67f96e9b7d33c4010d1fb3a35dd90963f72d (diff)
downloadavsystem-tizen.zip
avsystem-tizen.tar.gz
avsystem-tizen.tar.bz2
Change-Id: I84380907c9144cca63193062d2a579848e71629a
-rw-r--r--include/avsys-debug.h32
-rw-r--r--packaging/avsystem.spec2
2 files changed, 24 insertions, 10 deletions
diff --git a/include/avsys-debug.h b/include/avsys-debug.h
index d7ded66..b662a3b 100644
--- a/include/avsys-debug.h
+++ b/include/avsys-debug.h
@@ -40,26 +40,38 @@
#ifdef __DEBUG_MODE__
#ifdef __USE_LOGMANAGER__
-#define avsys_info_r(owner, msg, args...) log_print_rel( owner, LOG_CLASS_INFO, msg, ##args )
-#define avsys_warning_r(owner, msg, args...) log_print_rel( owner, LOG_CLASS_WARNING, msg, ##args )
-#define avsys_error_r(owner, msg, args...) log_print_rel( owner, LOG_CLASS_ERR, msg, ##args )
-#define avsys_critical_r(owner, msg, args...) log_print_rel( owner, LOG_CLASS_CRITICAL, msg, ##args )
+#define log_assert_rel(condition) \
+ do { \
+ if(!(condition)) { \
+ mm_log_by_owner(0, LOG_FATAL, "Assertion Fail", NULL); \
+ abort(); \
+ } \
+ } while(0)
+
+#define avsys_debug_r(owner, msg, args...) mm_log_by_owner( owner, LOG_DEBUG, msg, ##args )
+#define avsys_info_r(owner, msg, args...) mm_log_by_owner( owner, LOG_INFO, msg, ##args )
+#define avsys_warning_r(owner, msg, args...) mm_log_by_owner( owner, LOG_WARN, msg, ##args )
+#define avsys_error_r(owner, msg, args...) mm_log_by_owner( owner, LOG_ERROR, msg, ##args )
+#define avsys_critical_r(owner, msg, args...) mm_log_by_owner( owner, LOG_FATAL, msg, ##args )
#define avsys_assert_r(condition) log_assert_rel(( condition ))
-#define avsys_info(owner, msg, args...) log_print_dbg( owner, LOG_CLASS_INFO, msg, ##args )
-#define avsys_warning(owner, msg, args...) log_print_dbg( owner, LOG_CLASS_WARNING, msg, ##args )
-#define avsys_error(owner, msg, args...) log_print_dbg( owner, LOG_CLASS_ERR, msg, ##args )
-#define avsys_critical(owner, msg, args...) log_print_dbg( owner, LOG_CLASS_CRITICAL, msg, ##args )
-#define avsys_assert(condition) log_assert_dbg( (condition) )
+#define avsys_debug(owner, msg, args...) mm_log_by_owner( owner, LOG_DEBUG, msg, ##args )
+#define avsys_info(owner, msg, args...) mm_log_by_owner( owner, LOG_INFO, msg, ##args )
+#define avsys_warning(owner, msg, args...) mm_log_by_owner( owner, LOG_WARN, msg, ##args )
+#define avsys_error(owner, msg, args...) mm_log_by_owner( owner, LOG_ERROR, msg, ##args )
+#define avsys_critical(owner, msg, args...) mm_log_by_owner( owner, LOG_FATAL, msg, ##args )
+#define avsys_assert(condition) log_assert_rel( (condition) )
#else /* __USE_LOGMANAGER__ */
+#define avsys_debug_r(owner, msg, args...) fprintf(stderr, msg, ##args)
#define avsys_info_r(owner, msg, args...) fprintf(stderr, msg, ##args)
#define avsys_warning_r(owner, msg, args...) fprintf(stderr, msg, ##args)
#define avsys_error_r(owner, msg, args...) fprintf(stderr, msg, ##args)
#define avsys_critical_r(owner, msg, args...) fprintf(stderr, msg, ##args)
#define avsys_assert_r(condition) (condition)
+#define avsys_debug(owner, msg, args...) fprintf(stderr, msg, ##args)
#define avsys_info(owner, msg, args...) fprintf(stderr, msg, ##args)
#define avsys_warning(owner, msg, args...) fprintf(stderr, msg, ##args)
#define avsys_error(owner, msg, args...) fprintf(stderr, msg, ##args)
@@ -70,12 +82,14 @@
#else /* __DEBUG_MODE__ */
+#define avsys_debug_r(owner, msg, args...)
#define avsys_info_r(owner, msg, args...)
#define avsys_warning_r(owner, msg, args...)
#define avsys_error_r(owner, msg, args...)
#define avsys_critical_r(owner, msg, args...)
#define avsys_assert_r(condition) (condition)
+#define avsys_debug(owner, msg, args...)
#define avsys_info(owner, msg, args...)
#define avsys_warning(owner, msg, args...)
#define avsys_error(owner, msg, args...)
diff --git a/packaging/avsystem.spec b/packaging/avsystem.spec
index d1d2c95..e9d1fd4 100644
--- a/packaging/avsystem.spec
+++ b/packaging/avsystem.spec
@@ -1,6 +1,6 @@
Name: avsystem
Summary: Audio Video System
-Version: 0.5.5
+Version: 0.5.6
Release: 0
Group: System/Libraries
License: Apache-2.0