FirePHPHandlerTest.php 681B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /*
  3. * This file is part of the Monolog package.
  4. *
  5. * (c) Jordi Boggiano <j.boggiano@seld.be>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. spl_autoload_register(function($class)
  11. {
  12. $file = __DIR__.'/../../../../src/'.strtr($class, '\\', '/').'.php';
  13. if (file_exists($file)) {
  14. require $file;
  15. return true;
  16. }
  17. });
  18. use Monolog\Logger;
  19. use Monolog\Handler\FirePHPHandler;
  20. $logger = new Logger('firephp');
  21. $logger->pushHandler(new FirePHPHandler);
  22. $logger->addDebug('Debug');
  23. $logger->addInfo('Info');
  24. $logger->addWarning('Warning');
  25. $logger->addError('Error');