[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/Log/ -> Log.php (summary)

Joomla! Content Management System

Copyright: (C) 2011 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
File Size: 393 lines (12 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Log:: (9 methods):
  __construct()
  add()
  addLogger()
  registerLogger()
  addLoggerInternal()
  createDelegatedLogger()
  setInstance()
  addLogEntry()
  findLoggers()


Class: Log  - X-Ref

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.

__construct()   X-Ref
Constructor.


add($entry, $priority = self::INFO, $category = '', $date = null, array $context = array()   X-Ref
Method to add an entry to the log.

param: mixed    $entry     The LogEntry object to add to the log or the message for a new LogEntry object.
param: integer  $priority  Message priority.
param: string   $category  Type of entry
param: string   $date      Date of entry (defaults to now if not specified or blank)
param: array    $context   An optional array with additional message context.
return: void

addLogger(array $options, $priorities = self::ALL, $categories = array()   X-Ref
Add a logger to the Log instance.  Loggers route log entries to the correct files/systems to be logged.

param: array    $options     The object configuration array.
param: integer  $priorities  Message priority
param: array    $categories  Types of entry
param: boolean  $exclude     If true, all categories will be logged except those in the $categories array
return: void

registerLogger(string $key, string $class, bool $replace = false)   X-Ref
Register a logger to the registry

param: string   $key      The service key to be registered
param: string   $class    The class name of the logger
param: boolean  $replace  Flag indicating the service key may replace an existing definition
return: void

addLoggerInternal(array $options, $priorities = self::ALL, $categories = array()   X-Ref
Add a logger to the Log instance.  Loggers route log entries to the correct files/systems to be logged.
This method allows you to extend Log completely.

param: array    $options     The object configuration array.
param: integer  $priorities  Message priority
param: array    $categories  Types of entry
param: boolean  $exclude     If true, all categories will be logged except those in the $categories array
return: void

createDelegatedLogger()   X-Ref
Creates a delegated PSR-3 compatible logger from the current singleton instance. This method always returns a new delegated logger.

return: DelegatingPsrLogger

setInstance($instance)   X-Ref
Returns a reference to the a Log object, only creating it if it doesn't already exist.
Note: This is principally made available for testing and internal purposes.

param: Log  $instance  The logging object instance to be used by the static methods.
return: void

addLogEntry(LogEntry $entry)   X-Ref
Method to add an entry to the appropriate loggers.

param: LogEntry  $entry  The LogEntry object to send to the loggers.
return: void

findLoggers($priority, $category)   X-Ref
Method to find the loggers to use based on priority and category values.

param: integer  $priority  Message priority.
param: string   $category  Type of entry
return: array  The array of loggers to use for the given priority and category values.



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer