[nautilus-actions] Display debug informations when NAUTILUS_ACTIONS_DEBUG variable is set
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Display debug informations when NAUTILUS_ACTIONS_DEBUG variable is set
- Date: Thu, 2 Dec 2010 23:50:58 +0000 (UTC)
commit c0ec51201367ce1bdd4c78bb802c5c7681744a18
Author: Pierre Wieser <pwieser trychlos org>
Date: Wed Dec 1 21:18:57 2010 +0100
Display debug informations when NAUTILUS_ACTIONS_DEBUG variable is set
ChangeLog | 10 ++++++++++
configure.ac | 3 ++-
src/nact/nact-main.c | 4 +++-
src/plugin-menu/nautilus-module.c | 4 +++-
src/plugin-tracker/na-tracker-plugin.c | 4 +++-
src/utils/console-utils.c | 4 +++-
6 files changed, 24 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 7af22f0..3a4735d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2010-12-01 Pierre Wieser <pwieser trychlos org>
+ * configure.ac:
+ - Pre-release bump version number.
+ - Define NAUTILUS_ACTIONS_DEBUG variable.
+
+ * src/nact/nact-main.c (log_handler),
+ * src/plugin-menu/nautilus-module.c (log_handler),
+ * src/plugin-tracker/na-tracker-plugin.c (log_handler),
+ * src/utils/console-utils.c (log_handler):
+ Display debug informations when NAUTILUS_ACTIONS_DEBUG variable is set.
+
* doc/nact/Makefile.am:
Distribute admon-* icons with html docs (workaround for #636175).
diff --git a/configure.ac b/configure.ac
index 0adabf7..b1d3a42 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,7 +28,7 @@
AC_PREREQ([2.53])
-AC_INIT([Nautilus-Actions],[3.0],[maintainer nautilus-actions org],,[http://www.nautilus-actions.org])
+AC_INIT([Nautilus-Actions],[3.0.2],[maintainer nautilus-actions org],,[http://www.nautilus-actions.org])
AC_CANONICAL_TARGET
@@ -173,6 +173,7 @@ NA_NAUTILUS_EXTDIR
# define NA_MAINTAINER_MODE variable
NA_IS_MAINTAINER_MODE
+AC_DEFINE([NAUTILUS_ACTIONS_DEBUG],["NAUTILUS_ACTIONS_DEBUG"],[Debug environment variable])
# Check for menu update function
AC_CHECK_LIB(nautilus-extension, nautilus_menu_item_new)
diff --git a/src/nact/nact-main.c b/src/nact/nact-main.c
index 5acdaa5..a34e500 100644
--- a/src/nact/nact-main.c
+++ b/src/nact/nact-main.c
@@ -68,6 +68,8 @@ log_handler( const gchar *log_domain, GLogLevelFlags log_level, const gchar *mes
#ifdef NA_MAINTAINER_MODE
( *st_default_log_func )( log_domain, log_level, message, user_data );
#else
- /* do nothing */
+ if( g_getenv( NAUTILUS_ACTIONS_DEBUG )){
+ ( *st_default_log_func )( log_domain, log_level, message, user_data );
+ }
#endif
}
diff --git a/src/plugin-menu/nautilus-module.c b/src/plugin-menu/nautilus-module.c
index 810641a..20c5b16 100644
--- a/src/plugin-menu/nautilus-module.c
+++ b/src/plugin-menu/nautilus-module.c
@@ -141,7 +141,9 @@ log_handler( const gchar *log_domain, GLogLevelFlags log_level, const gchar *mes
/*( *st_default_log_func )( log_domain, log_level, message, user_data );*/
syslog( LOG_USER | LOG_DEBUG, "%s%s", tmp, message );
#else
- /* do nothing */
+ if( g_getenv( NAUTILUS_ACTIONS_DEBUG )){
+ syslog( LOG_USER | LOG_DEBUG, "%s%s", tmp, message );
+ }
#endif
g_free( tmp );
diff --git a/src/plugin-tracker/na-tracker-plugin.c b/src/plugin-tracker/na-tracker-plugin.c
index faf17af..a4663ba 100644
--- a/src/plugin-tracker/na-tracker-plugin.c
+++ b/src/plugin-tracker/na-tracker-plugin.c
@@ -137,7 +137,9 @@ log_handler( const gchar *log_domain, GLogLevelFlags log_level, const gchar *mes
/*( *st_default_log_func )( log_domain, log_level, message, user_data );*/
syslog( LOG_USER | LOG_DEBUG, "%s%s", tmp, message );
#else
- /* do nothing */
+ if( g_getenv( NAUTILUS_ACTIONS_DEBUG )){
+ syslog( LOG_USER | LOG_DEBUG, "%s%s", tmp, message );
+ }
#endif
g_free( tmp );
diff --git a/src/utils/console-utils.c b/src/utils/console-utils.c
index 553835e..d6d7472 100644
--- a/src/utils/console-utils.c
+++ b/src/utils/console-utils.c
@@ -58,6 +58,8 @@ log_handler( const gchar *log_domain, GLogLevelFlags log_level, const gchar *mes
#ifdef NA_MAINTAINER_MODE
( *st_default_log_func )( log_domain, log_level, message, user_data );
#else
- /* do nothing */
+ if( g_getenv( NAUTILUS_ACTIONS_DEBUG )){
+ ( *st_default_log_func )( log_domain, log_level, message, user_data );
+ }
#endif
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]