Öffentliche Methoden | |
| trace ($message) | |
| debug ($message) | |
| info ($message) | |
| warn ($message) | |
| error ($message) | |
| doLog ($facility, $message) | |
Definiert in Zeile 74 der Datei Logger.class.php.
| Logger::debug | ( | $ | message | ) |
Schreiben einer Debug-Meldung in die Logdatei
| message | Log-Text |
Definiert in Zeile 93 der Datei Logger.class.php.
Benutzt doLog().
Wird benutzt von IndexAction::checkLogin(), User::checkPassword(), TemplateEngine::compile(), DB::connect(), WebdavAction::copy(), Value::generate(), WebdavAction::httpStatus(), WebdavAction::move(), WebdavAction::multiStatus(), WebdavAction::options(), WebdavAction::parseURI(), WebdavAction::propfind(), Page::replaceTemplate(), WebdavAction::setDefaultDb(), FilemanagerAction::show(), Object::tmpfileYYYYYY() und WebdavAction::WebdavAction().
00094 { 00095 if ( OR_LOG_LEVEL_DEBUG ) 00096 Logger::doLog( 'debug',$message ); 00097 }
| Logger::doLog | ( | $ | facility, | |
| $ | message | |||
| ) |
Schreiben der Meldung in die Logdatei
| facility | Schwere dieses Logdatei-Eintrages (z.B. warning) | |
| message | Log-Text private |
Definiert in Zeile 144 der Datei Logger.class.php.
Benutzt $action, $conf, $SESS, Session::get(), Session::getUser() und Http::serverError().
Wird benutzt von debug(), error(), info(), trace() und warn().
00145 { 00146 global $conf; 00147 global $SESS; 00148 00149 $filename = $conf['log']['file']; 00150 00151 if ( $filename == '' ) 00152 return; 00153 00154 if ( ! is_writable($filename) ) 00155 Http::serverError( "logfile $filename is not writable by the server" ); 00156 00157 $thisLevel = strtoupper($facility); 00158 00159 $user = Session::getUser(); 00160 if ( is_object($user) ) 00161 $username = $user->name; 00162 else 00163 $username = '-'; 00164 00165 $text = $conf['log']['format']; // Format der Logdatei lesen 00166 00167 // Ersetzen von Variablen 00168 if ( $conf['log']['dns_lookup'] ) 00169 $text = str_replace( '%host',gethostbyaddr(getenv('REMOTE_ADDR')),$text ); 00170 else 00171 $text = str_replace( '%host',getenv('REMOTE_ADDR'),$text ); 00172 00173 $action = Session::get('action'); 00174 if ( empty($action) ) 00175 $action = '-'; 00176 00177 $action = Session::get('action'); 00178 if ( empty($action) ) 00179 $action = '-'; 00180 00181 $text = str_replace( '%user' ,str_pad($username ,8),$text ); 00182 $text = str_replace( '%level' ,str_pad($thisLevel,5),$text ); 00183 $text = str_replace( '%agent' ,getenv('HTTP_USER_AGENT'),$text ); 00184 $text = str_replace( '%action',str_pad($action,12),$text ); 00185 $text = str_replace( '%text' ,$message,$text ); 00186 $text = str_replace( '%time' ,date($conf['log']['date_format']),$text ); 00187 00188 // Schreiben in Logdatei 00189 error_log( $text."\n",3,$filename ); 00190 }
| Logger::error | ( | $ | message | ) |
Schreiben einer normalen Fehlermeldung in die Logdatei
| message | Log-Text |
Definiert in Zeile 129 der Datei Logger.class.php.
Benutzt doLog().
Wird benutzt von Ldap::connect(), Ftp::connect(), WebdavAction::copy(), Value::generate(), Mail::header_encode() und WebdavAction::move().
00130 { 00131 if ( OR_LOG_LEVEL_ERROR ) 00132 Logger::doLog( 'error',$message ); 00133 }
| Logger::info | ( | $ | message | ) |
Schreiben einer Information in die Logdatei
| message | Log-Text |
Definiert in Zeile 105 der Datei Logger.class.php.
Benutzt doLog().
Wird benutzt von IndexAction::checkLogin() und WebdavAction::WebdavAction().
00106 { 00107 if ( OR_LOG_LEVEL_INFO ) 00108 Logger::doLog( 'info',$message ); 00109 }
| Logger::trace | ( | $ | message | ) |
Schreiben einer Trace-Meldung in die Logdatei
| message | Log-Text |
Definiert in Zeile 81 der Datei Logger.class.php.
Benutzt doLog().
Wird benutzt von Action::callSubAction(), Acl::getMask() und DB::query().
00082 { 00083 if ( OR_LOG_LEVEL_TRACE ) 00084 Logger::doLog( 'trace',$message ); 00085 }
| Logger::warn | ( | $ | message | ) |
Schreiben einer Warnung in die Logdatei
| message | Log-Text |
Definiert in Zeile 117 der Datei Logger.class.php.
Benutzt doLog().
Wird benutzt von Pdf::Error(), filemanagerErrorHandler(), Value::generate(), Pdf::Image(), Action::message(), DB::query(), IndexAction::show(), FilemanagerAction::show(), IndexAction::showlogin() und webdavErrorHandler().
00118 { 00119 if ( OR_LOG_LEVEL_WARN ) 00120 Logger::doLog( 'warn',$message ); 00121 }
1.5.8