Verzeichnisstruktur phpBB-3.1.0


Veröffentlicht
27.10.2014

So funktioniert es


Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück

Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

      (Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

AbstractLogger.php

Zuletzt modifiziert: 09.10.2024, 12:57 - Dateigröße: 2.95 KiB


 001  <?php
 002   
 003  namespace Psr\Log;
 004   
 005  /**
 006   * This is a simple Logger implementation that other Loggers can inherit from.
 007   *
 008   * It simply delegates all log-level-specific methods to the `log` method to
 009   * reduce boilerplate code that a simple Logger that does the same thing with
 010   * messages regardless of the error level has to implement.
 011   */
 012  abstract class AbstractLogger implements LoggerInterface
 013  {
 014      /**
 015       * System is unusable.
 016       *
 017       * @param string $message
 018       * @param array $context
 019       * @return null
 020       */
 021      public function emergency($message, array $context = array())
 022      {
 023          $this->log(LogLevel::EMERGENCY, $message, $context);
 024      }
 025   
 026      /**
 027       * Action must be taken immediately.
 028       *
 029       * Example: Entire website down, database unavailable, etc. This should
 030       * trigger the SMS alerts and wake you up.
 031       *
 032       * @param string $message
 033       * @param array $context
 034       * @return null
 035       */
 036      public function alert($message, array $context = array())
 037      {
 038          $this->log(LogLevel::ALERT, $message, $context);
 039      }
 040   
 041      /**
 042       * Critical conditions.
 043       *
 044       * Example: Application component unavailable, unexpected exception.
 045       *
 046       * @param string $message
 047       * @param array $context
 048       * @return null
 049       */
 050      public function critical($message, array $context = array())
 051      {
 052          $this->log(LogLevel::CRITICAL, $message, $context);
 053      }
 054   
 055      /**
 056       * Runtime errors that do not require immediate action but should typically
 057       * be logged and monitored.
 058       *
 059       * @param string $message
 060       * @param array $context
 061       * @return null
 062       */
 063      public function error($message, array $context = array())
 064      {
 065          $this->log(LogLevel::ERROR, $message, $context);
 066      }
 067   
 068      /**
 069       * Exceptional occurrences that are not errors.
 070       *
 071       * Example: Use of deprecated APIs, poor use of an API, undesirable things
 072       * that are not necessarily wrong.
 073       *
 074       * @param string $message
 075       * @param array $context
 076       * @return null
 077       */
 078      public function warning($message, array $context = array())
 079      {
 080          $this->log(LogLevel::WARNING, $message, $context);
 081      }
 082   
 083      /**
 084       * Normal but significant events.
 085       *
 086       * @param string $message
 087       * @param array $context
 088       * @return null
 089       */
 090      public function notice($message, array $context = array())
 091      {
 092          $this->log(LogLevel::NOTICE, $message, $context);
 093      }
 094   
 095      /**
 096       * Interesting events.
 097       *
 098       * Example: User logs in, SQL logs.
 099       *
 100       * @param string $message
 101       * @param array $context
 102       * @return null
 103       */
 104      public function info($message, array $context = array())
 105      {
 106          $this->log(LogLevel::INFO, $message, $context);
 107      }
 108   
 109      /**
 110       * Detailed debug information.
 111       *
 112       * @param string $message
 113       * @param array $context
 114       * @return null
 115       */
 116      public function debug($message, array $context = array())
 117      {
 118          $this->log(LogLevel::DEBUG, $message, $context);
 119      }
 120  }
 121