sfConsoleLogger.class.php 835 B

12345678910111213141516171819202122232425262728293031
  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. * sfConsoleLogger logs messages to the console.
  11. *
  12. * @package symfony
  13. * @subpackage log
  14. * @author Fabien Potencier <fabien.potencier@symfony-project.com>
  15. * @version SVN: $Id: sfConsoleLogger.class.php 10952 2008-08-19 15:04:33Z fabien $
  16. */
  17. class sfConsoleLogger extends sfStreamLogger
  18. {
  19. /**
  20. * @see sfStreamLogger
  21. */
  22. public function initialize(sfEventDispatcher $dispatcher, $options = array())
  23. {
  24. $options['stream'] = defined('STDOUT') ? STDOUT : fopen('php://stdout', 'w');
  25. return parent::initialize($dispatcher, $options);
  26. }
  27. }