⇦ Back to Joomla project (class list)Class Log - list of methods
Joomla! Log Class
This class hooks into the global log configuration settings to allow for user configured
logging events to be sent to where the user wishes them to be sent. On high load sites
Syslog is probably the best (pure PHP function), then the text file based loggers (CSV, W3c
or plain Formattedtext) and finally MySQL offers the most features (e.g. rapid searching)
but will incur a performance hit due to INSERT being issued.
Package: Joomla\CMS\Log
Copyright: (C) 2011 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Log/Log.php
Method Summary
public static void
(mixed $entry, mixed $priority = self::INFO, mixed $category = '', mixed $date = null, array $context = array())
Method to add an entry to the log.
Parameters
- mixed $entry The LogEntry object to add to the log or the message for a new LogEntry object.
- int $priority Message priority.
- string $category Type of entry
- string $date Date of entry (defaults to now if not specified or blank)
- array $context An optional array with additional message context.
Returns
Since
public static void
(array $options, mixed $priorities = self::ALL, mixed $categories = array(), mixed $exclude = false)
Add a logger to the Log instance. Loggers route log entries to the correct files/systems to be logged.
Parameters
- array $options The object configuration array.
- int $priorities Message priority
- array $categories Types of entry
- bool $exclude If true, all categories will be logged except those in the $categories array
Returns
Since
public void
(string $key, string $class, bool $replace = false)
Register a logger to the registry
Parameters
- string $key The service key to be registered
- string $class The class name of the logger
- bool $replace Flag indicating the service key may replace an existing definition
Returns
Since
protected void
(array $options, mixed $priorities = self::ALL, mixed $categories = array(), mixed $exclude = false)
Add a logger to the Log instance. Loggers route log entries to the correct files/systems to be logged.
Parameters
- array $options The object configuration array.
- int $priorities Message priority
- array $categories Types of entry
- bool $exclude If true, all categories will be logged except those in the $categories array
Returns
Since
public static \Joomla\CMS\Log\DelegatingPsrLogger
()
Creates a delegated PSR-3 compatible logger from the current singleton instance. This method always returns a new delegated logger.
Returns
- \Joomla\CMS\Log\DelegatingPsrLogger
Since
public static void
(mixed $instance)
Returns a reference to the a Log object, only creating it if it doesn't already exist.
Parameters
- \Joomla\CMS\Log\Log $instance The logging object instance to be used by the static methods.
Returns
Since
protected void
(\Joomla\CMS\Log\LogEntry $entry)
Method to add an entry to the appropriate loggers.
Parameters
- \Joomla\CMS\Log\LogEntry $entry The LogEntry object to send to the loggers.
Returns
Since
-
protected array
(mixed $priority, mixed $category)
Method to find the loggers to use based on priority and category values.
Parameters
- int $priority Message priority.
- string $category Type of entry
Returns
- array The array of loggers to use for the given priority and category values.
Since
Properties Summary
protected static \Joomla\CMS\Log\Log
$instance
The global Log instance.
Since
protected array
$configurations
Container for Logger configurations.
Since
protected \Joomla\CMS\Log\Logger[]
$loggers
Container for Logger objects.
Since
protected array
$lookup
Lookup array for loggers.
Since
protected \Joomla\CMS\Log\LoggerRegistry
$loggerRegistry
The registry of available loggers
Since
Constants Summary
public int
$EMERGENCY
The system is unusable.
Since
public int
$ALERT
Action must be taken immediately.
Since
public int
$CRITICAL
Critical conditions.
Since
public int
$NOTICE
Normal, but significant condition.
Since
public int
$INFO
Informational message.
Since
Tags Summary