HEX
Server: Apache
System: Linux dev.epsylon.net 3.10.0-1160.144.1.el7.tuxcare.els2.x86_64 #1 SMP Sun Feb 15 11:22:42 UTC 2026 x86_64
User: graficav (1037)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/graficav/holatimbres.cl/tools/swift/Swift/LogContainer.php
<?php

/**
 * A registry for the logger object.
 * Please read the LICENSE file
 * @author Chris Corbyn <chris@w3style.co.uk>
 * @package Swift_Log
 * @license GNU Lesser General Public License
 */

require_once dirname(__FILE__) . "/ClassLoader.php";
Swift_ClassLoader::load("Swift_Log_DefaultLog");

/**
 * A registry holding the current instance of the log.
 * @package Swift_Log
 * @author Chris Corbyn <chris@w3style.co.uk>
 */
class Swift_LogContainer
{
  /**
   * The log instance.
   * @var Swift_Log
   */
  protected static $log = null;
  
  /**
   * Registers the logger.
   * @param Swift_Log The log
   */
  public static function setLog(Swift_Log $log)
  {
    self::$log = $log;
  }
  /**
   * Returns the current instance of the log, or lazy-loads the default one.
   * @return Swift_Log
   */
  public static function getLog()
  {
    if (self::$log === null)
    {
      self::setLog(new Swift_Log_DefaultLog());
    }
    return self::$log;
  }
}