thomas: server/perl-kolab/lib Kolab.pm,1.9,1.10

cvs at kolab.org cvs at kolab.org
Tue Oct 23 11:17:46 CEST 2007


Author: thomas

Update of /kolabrepository/server/perl-kolab/lib
In directory doto:/tmp/cvs-serv31160/perl-kolab/lib

Modified Files:
	Kolab.pm 
Log Message:
Show component and log level when sending debug log to stdout.


Index: Kolab.pm
===================================================================
RCS file: /kolabrepository/server/perl-kolab/lib/Kolab.pm,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- Kolab.pm	23 Oct 2007 09:11:28 -0000	1.9
+++ Kolab.pm	23 Oct 2007 09:17:44 -0000	1.10
@@ -422,20 +422,17 @@
     my $text = shift;
     my $priority = shift || KOLAB_INFO;
 
-    my $level = $config{'log_level'};
-    if ($level >= $priority) {
-        if ($priority == KOLAB_ERROR) {
-            $text = $prefix . ' Error: ' . $text;
-        } elsif ($priority == KOLAB_WARN) {
-            $text = $prefix . ' Warning: ' . $text;
-        } elsif ($priority == KOLAB_DEBUG) {
-            $text = $prefix . ' Debug: ' . $text;
-        } else {
-            $text = $prefix . ': ' . $text;
-        }
-        syslog('info', "$text");
+    if ($priority == KOLAB_ERROR) {
+        $text = $prefix . ' Error: ' . $text;
+    } elsif ($priority == KOLAB_WARN) {
+        $text = $prefix . ' Warning: ' . $text;
+    } elsif ($priority == KOLAB_DEBUG) {
+        $text = $prefix . ' Debug: ' . $text;
+    } else {
+        $text = $prefix . ': ' . $text;
     }
-    print STDERR "$text\n" if ($config{'debug'});
+    syslog('info', "$text") if $config{'log_level'} >= $priority;
+    print STDERR "$text\n" if $config{'debug'};
 }
 
 1;





More information about the commits mailing list