thomas: server/perl-kolab/Kolab Kolab.pm.in,1.6.2.1,1.6.2.2
cvs at kolab.org
cvs at kolab.org
Tue Oct 23 11:14:13 CEST 2007
Author: thomas
Update of /kolabrepository/server/perl-kolab/Kolab
In directory doto:/tmp/cvs-serv31028/perl-kolab/Kolab
Modified Files:
Tag: kolab_2_1_branch
Kolab.pm.in
Log Message:
Show component and log level when sending debug log to stdout.
Index: Kolab.pm.in
===================================================================
RCS file: /kolabrepository/server/perl-kolab/Kolab/Attic/Kolab.pm.in,v
retrieving revision 1.6.2.1
retrieving revision 1.6.2.2
diff -u -d -r1.6.2.1 -r1.6.2.2
--- Kolab.pm.in 19 Sep 2007 17:06:42 -0000 1.6.2.1
+++ Kolab.pm.in 23 Oct 2007 09:14:10 -0000 1.6.2.2
@@ -464,20 +464,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'};
}
reloadConfig();
More information about the commits
mailing list