Exemple #1
0
 /**
  * Sets the default logger.  If no logName is specified, then "LOG" is used.  For any
  * named logger other than "LOG", the logger must have been registered with registerLogger().
  *
  * @param  string        $logName        Name of this instance, used to access it from other static functions.
  * @return boolean       True
  */
 public static function setDefaultLogger($logName = null)
 {
     if (is_null($logName) || $logName == 'LOG') {
         $logName = 'LOG';
     } else {
         if (!self::hasLogger($logName)) {
             throw new Zend_Log_Exception("Cannot set default, no instance of log named \"{$logName}\".");
         }
     }
     self::$_defaultLogName = $logName;
     return true;
 }