From: janw Date: Thu, 30 Apr 2009 13:59:14 +0000 (+0000) Subject: Don't open filehandle in daemon_log if we don't want to write anything. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9c842df8cd3dfa7a9b9a043d0f69c004f51f210c;p=gosa.git Don't open filehandle in daemon_log if we don't want to write anything. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13598 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server index 7a7ea0870..510a049cf 100755 --- a/gosa-si/gosa-si-server +++ b/gosa-si/gosa-si-server @@ -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) {