[X2Go-Commits] [x2goserver] 01/01: x2goserver/sbin/x2gocleansessions: only output status refreshing debug message if the old and new states actually differ.

git-admin at x2go.org git-admin at x2go.org
Wed Jun 24 17:27:30 CEST 2015


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch release/4.0.1.x
in repository x2goserver.

commit c00cd1ea899c93dc8df06a3f14e9246b9ec10669
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Wed Jun 24 16:56:47 2015 +0200

    x2goserver/sbin/x2gocleansessions: only output status refreshing debug message if the old and new states actually differ.
    
    Prevents log spam.
---
 debian/changelog                  |    2 ++
 x2goserver/sbin/x2gocleansessions |    4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index ed9d335..f12f400 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -60,6 +60,8 @@ x2goserver (4.0.1.20-0x2go1) UNRELEASED; urgency=low
       hope this doesn't bite back some time or later...
     - x2goserver/sbin/x2gocleansessions: add debugging output to show the
       state change when updating the cached state result.
+    - x2goserver/sbin/x2gocleansessions: only output status refreshing debug
+      message if the old and new states actually differ. Prevents log spam.
   * x2goserver.spec:
     - Add sudo and logcheck as BuildRequires and Requires. Don't own
       directories that are owned by sudo and logcheck. Logcheck is not
diff --git a/x2goserver/sbin/x2gocleansessions b/x2goserver/sbin/x2gocleansessions
index 4fb846d..68b7e8e 100755
--- a/x2goserver/sbin/x2gocleansessions
+++ b/x2goserver/sbin/x2gocleansessions
@@ -196,7 +196,9 @@ elsif ($pid == 0 )
 			# Update current status once per session. Avoids race conditions.
 			my $current_status = system_capture_stdout_output ("$x2go_lib_path/x2gogetstatus", "@sinfo[1]");
 			if (length ($current_status)) {
-				syslog ('debug', "@sinfo[1]: updating session status from '@sinfo[4]' to '$current_status'.");
+				if (@sinfo[4] ne $current_status) {
+					syslog ('debug', "@sinfo[1]: updating session status from '@sinfo[4]' to '$current_status'.");
+				}
 				@sinfo[4] = $current_status;
 			}
 			else {

--
Alioth's /srv/git/code.x2go.org/x2goserver.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git


More information about the x2go-commits mailing list