Source for file messagequeue.php

Documentation is available at messagequeue.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Platform
  4.  * @subpackage  Log
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  7.  * @license     GNU General Public License version 2 or later; see LICENSE
  8.  */
  9.  
  10. defined('JPATH_PLATFORM'or die;
  11.  
  12. /**
  13.  * Joomla MessageQueue logger class.
  14.  *
  15.  * This class is designed to output logs to a specific MySQL database table. Fields in this
  16.  * table are based on the Syslog style of log output. This is designed to allow quick and
  17.  * easy searching.
  18.  *
  19.  * @package     Joomla.Platform
  20.  * @subpackage  Log
  21.  * @since       11.1
  22.  */
  23. {
  24.     /**
  25.      * Method to add an entry to the log.
  26.      *
  27.      * @param   JLogEntry  $entry  The log entry object to add to the log.
  28.      *
  29.      * @return  void 
  30.      *
  31.      * @since   11.1
  32.      */
  33.     public function addEntry(JLogEntry $entry)
  34.     {
  35.         switch ($entry->priority)
  36.         {
  37.             case JLog::EMERGENCY:
  38.             case JLog::ALERT:
  39.             case JLog::CRITICAL:
  40.             case JLog::ERROR:
  41.                 JFactory::getApplication()->enqueueMessage($entry->message'error');
  42.                 break;
  43.             case JLog::WARNING:
  44.                 JFactory::getApplication()->enqueueMessage($entry->message'warning');
  45.                 break;
  46.             case JLog::NOTICE:
  47.                 JFactory::getApplication()->enqueueMessage($entry->message'notice');
  48.                 break;
  49.             case JLog::INFO:
  50.                 JFactory::getApplication()->enqueueMessage($entry->message'message');
  51.                 break;
  52.             default:
  53.                 // Ignore other priorities.
  54.                 break;
  55.         }
  56.     }
  57. }

Documentation generated on Tue, 19 Nov 2013 15:08:07 +0100 by phpDocumentor 1.4.3