DebugHelper.php 610 B

123456789101112131415161718
  1. <?php
  2. function debug_message($message)
  3. {
  4. if (sfConfig::get('sf_web_debug') && sfConfig::get('sf_logging_enabled'))
  5. {
  6. sfContext::getInstance()->getEventDispatcher()->notify(new sfEvent(null, 'application.log', array('This feature is deprecated in favor of the log_message helper.', 'priority' => sfLogger::ERR)));
  7. }
  8. }
  9. function log_message($message, $priority = 'info')
  10. {
  11. if (sfConfig::get('sf_logging_enabled'))
  12. {
  13. sfContext::getInstance()->getEventDispatcher()->notify(new sfEvent(null, 'application.log', array($message, 'priority' => constant('sfLogger::'.strtoupper($priority)))));
  14. }
  15. }