All pastes #268237 Raw Edit

Sans titre

public text v1 · immutable
·published 2006-12-05 14:13 UTC
rendered paste body

  function addLogger($logger){
     $this->loggers[]=$logger;
  }


  public static function getInstance(){
     static $inst = null;
     if($inst === null){
          global $gJConfig;
          $inst = new jLogger();
          $liste = lecture de la liste des logger dans $gJConfig
          $inst->assLogger() pour chaque logger


     }
     return $inst;
  }


   public static function error($msg){
      $inst = self::getInstance();
       $inst->log('ERROR',msg);
   }

   protected function log($type, $msg) {...}