<?php

class sfPropel13LogWrapper
{
  protected static $instance = null;
	
  public static function getInstance()
  {
    if (!sfPropel13LogWrapper::$instance)
    {
      // the class exists
      $class = __CLASS__;
      sfPropel13LogWrapper::$instance = new $class();
    }

    return sfPropel13LogWrapper::$instance;
  }
  
  protected function logger()
  {
  	return sfLogger::getInstance();
  }

  public function log($message, $priority = SF_LOG_INFO)
  {
    $this->logger()->log('{Propel} ' . $message, $priority);
  }

  public function emerg($message)
  {
    $this->log($message, SF_LOG_EMERG);
  }

  public function alert($message)
  {
    $this->log($message, SF_LOG_ALERT);
  }

  public function crit($message)
  {
    $this->log($message, SF_LOG_CRIT);
  }

  public function err($message)
  {
    $this->log($message, SF_LOG_ERR);
  }

  public function warning($message)
  {
    $this->log($message, SF_LOG_WARNING);
  }

  public function notice($message)
  {
    $this->log($message, SF_LOG_NOTICE);
  }

  public function info($message)
  {
    $this->log($message, SF_LOG_INFO);
  }
  
  public function debug($message)
  {
    $this->log($message, SF_LOG_DEBUG);
  }
}
