sfLoggerWrapper.class.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /*
  3. * This file is part of the symfony package.
  4. * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
  5. *
  6. * For the full copyright and license information, please view the LICENSE
  7. * file that was distributed with this source code.
  8. */
  9. /**
  10. * sfLoggerWrapper wraps a class that implements sfLoggerInterface into a real sfLogger object.
  11. *
  12. * @package symfony
  13. * @subpackage log
  14. * @author Fabien Potencier <fabien.potencier@symfony-project.com>
  15. * @version SVN: $Id: sfLoggerWrapper.class.php 9081 2008-05-20 00:47:12Z Carl.Vondrick $
  16. */
  17. class sfLoggerWrapper extends sfLogger
  18. {
  19. protected
  20. $logger = null;
  21. /**
  22. * Creates a new logger wrapper
  23. *
  24. * @param sfLoggerInterface $logger The wrapped logger
  25. */
  26. public function __construct(sfLoggerInterface $logger)
  27. {
  28. $this->logger = $logger;
  29. }
  30. /**
  31. * Logs a message.
  32. *
  33. * @param string $message Message
  34. * @param string $priority Message priority
  35. */
  36. protected function doLog($message, $priority)
  37. {
  38. $this->logger->log($message, $priority);
  39. }
  40. }