Code

Don't open filehandle in daemon_log if we don't want to write anything.
authorjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 30 Apr 2009 13:59:14 +0000 (13:59 +0000)
committerjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 30 Apr 2009 13:59:14 +0000 (13:59 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13598 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/gosa-si-server

index 7a7ea0870eb9dbcb973d2c4b8cc592fe9235fcd6..510a049cf6676c476d66882bab197c841742da0d 100755 (executable)
@@ -328,6 +328,7 @@ sub daemon_log {
     my( $msg, $level ) = @_;
     if(not defined $msg) { return }
     if(not defined $level) { $level = 1 }
+               if($level > $verbose) { return }
     if(defined $log_file){
         my $open_log_fh = sysopen(LOG_HANDLE, $log_file, O_WRONLY | O_CREAT | O_APPEND , 0440);
         if(not $open_log_fh) {