Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Référence de la classe Log

Fonctions membres publiques

 registerLogger (string $key, string $class, bool $replace=false)
 

Fonctions membres publiques statiques

static add ($entry, $priority=self::INFO, $category='', $date=null, array $context=array())
 
static addLogger (array $options, $priorities=self::ALL, $categories=array(), $exclude=false)
 
static createDelegatedLogger ()
 
static setInstance ($instance)
 

Champs de données

const ALL = 30719
 
const EMERGENCY = 1
 
const ALERT = 2
 
const CRITICAL = 4
 
const ERROR = 8
 
const WARNING = 16
 
const NOTICE = 32
 
const INFO = 64
 
const DEBUG = 128
 

Fonctions membres protégées

 __construct ()
 
 addLoggerInternal (array $options, $priorities=self::ALL, $categories=array(), $exclude=false)
 
 addLogEntry (LogEntry $entry)
 
 findLoggers ($priority, $category)
 

Attributs protégés

 $configurations = array()
 
 $loggers = array()
 
 $lookup = array()
 
 $loggerRegistry
 

Attributs protégés statiques

static $instance
 

Description détaillée

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.

Depuis
1.7.0

Documentation des constructeurs et destructeur

◆ __construct()

__construct ( )
protected

Constructor.

Depuis
1.7.0

Documentation des fonctions membres

◆ add()

static add (   $entry,
  $priority = self::INFO,
  $category = '',
  $date = null,
array  $context = array() 
)
static

Method to add an entry to the log.

Paramètres
mixed$entryThe LogEntry object to add to the log or the message for a new LogEntry object.
integer$priorityMessage priority.
string$categoryType of entry
string$dateDate of entry (defaults to now if not specified or blank)
array$contextAn optional array with additional message context.
Renvoie
void
Depuis
1.7.0

Références $category, $context, et $date.

Référencé par Response\__construct(), Authentication\__construct(), InstallerExtension\__construct(), DaemonApplication\__construct(), TaskOption\__get(), FormField\__set(), FileStorage\_deleteFolder(), FileStorage\_filesInFolder(), FileStorage\_folders(), Editor\_loadEditor(), FtpClient\_mode(), FtpClient\_passive(), FtpClient\_putCmd(), ContactController\_sendEmail(), FtpClient\_verifyResponse(), Installer\abort(), RegistrationModel\activate(), UserHelper\activateUser(), File\append(), Authentication\authenticate(), IndexerController\batch(), DaemonApplication\changeIdentity(), FtpClient\chdir(), FtpClient\chmod(), FtpClient\connect(), File\copy(), Installer\copyFiles(), Folder\create(), FtpClient\create(), LanguageAdapter\createContentLanguage(), Factory\createMailer(), DaemonApplication\daemonize(), MessageModel\delete(), HistoryModel\delete(), File\delete(), Folder\delete(), FtpClient\delete(), AdminModel\delete(), DaemonApplication\detach(), InstallerHelper\detectType(), LanguageAdapter\discover_install(), XmlView\display(), InstallerHelper\downloadPackage(), UpdateModel\downloadPackage(), DaemonApplication\execute(), Folder\files(), ComponentAdapter\finaliseUninstall(), Installer\findManifest(), Folder\folders(), DaemonApplication\fork(), FtpClient\get(), ContentHelper\getActions(), Access\getAssetRules(), CMSApplication\getCfg(), RedisStorage\getConnection(), SysinfoModel\getExtensions(), ItemsModel\getMenu(), MultilangstatusHelper\getModule(), CategoryField\getOptions(), PluginsField\getOptions(), Authentication\getPKCredentialRequestOptions(), Authentication\getPubkeyRequestOptions(), UpdateAdapter\getUpdateSiteResponse(), ExceptionHandler\handleUserDeprecatedErrors(), DaemonApplication\isActive(), HistoryModel\keep(), FtpClient\listDetails(), FtpClient\listNames(), User\load(), Toolbar\loadButtonType(), Changelog\loadFromXml(), Update\loadFromXml(), ExceptionHandler\logException(), FtpClient\login(), Joomla\Component\Scheduler\Administrator\Traits\logTask(), FtpClient\mkdir(), File\move(), Installer\parseFiles(), Installer\parseLanguages(), Installer\parseMedia(), Installer\parseQueries(), Installer\parseSchemaUpdates(), Installer\parseSQLFiles(), FileAdapter\populateFilesAndFolderList(), InstallerScript\preflight(), RemindModel\processRemindRequest(), ResetModel\processResetRequest(), ItemsController\publish(), MessageModel\publish(), AdminModel\publish(), FtpClient\pwd(), FtpClient\read(), ModuleAdapter\refreshManifestCache(), LibraryAdapter\refreshManifestCache(), FileAdapter\refreshManifestCache(), PluginAdapter\refreshManifestCache(), TemplateAdapter\refreshManifestCache(), PackageAdapter\refreshManifestCache(), LanguageAdapter\refreshManifestCache(), ComponentAdapter\refreshManifestCache(), RegistrationModel\register(), FtpClient\reinit(), LanguageAdapter\removeExtensionFiles(), TemplateAdapter\removeExtensionFiles(), PackageAdapter\removeExtensionFiles(), Installer\removeFiles(), FtpClient\rename(), AdminModel\reorder(), LanguageAdapter\resetUserLanguage(), DaemonApplication\restart(), FtpClient\restart(), ApplicationModel\save(), MessageModel\save(), AdminModel\saveorder(), MailModel\send(), Email\sendCode(), IndexerController\sendResponse(), WorkflowModel\setDefault(), StageModel\setDefault(), Mail\setSender(), DaemonApplication\setupSignalHandlers(), DaemonApplication\shutdown(), DaemonApplication\signal(), IndexerController\start(), DaemonApplication\stop(), FtpClient\store(), FtpClient\syst(), InstallerAdapter\uninstall(), File\upload(), Authentication\validateAssertionResponse(), File\write(), FtpClient\write(), et DaemonApplication\writeProcessIdFile().

◆ addLogEntry()

addLogEntry ( LogEntry  $entry)
protected

Method to add an entry to the appropriate loggers.

Paramètres
LogEntry$entryThe LogEntry object to send to the loggers.
Renvoie
void
Depuis
1.7.0
Exceptions

Références $class, Log\$loggers, $this, et Log\findLoggers().

◆ addLogger()

static addLogger ( array  $options,
  $priorities = self::ALL,
  $categories = array(),
  $exclude = false 
)
static

Add a logger to the Log instance. Loggers route log entries to the correct files/systems to be logged.

Paramètres
array$optionsThe object configuration array.
integer$prioritiesMessage priority
array$categoriesTypes of entry
boolean$excludeIf true, all categories will be logged except those in the $categories array
Renvoie
void
Depuis
1.7.0

Références $options.

Référencé par Response\__construct(), Webauthn\__construct(), Task\__construct(), BaseController\__construct(), IndexerController\batch(), ModuleHelper\renderModule(), IndexerController\sendResponse(), CMSApplication\setupLogging(), et IndexerController\start().

◆ addLoggerInternal()

addLoggerInternal ( array  $options,
  $priorities = self::ALL,
  $categories = array(),
  $exclude = false 
)
protected

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ètres
array$optionsThe object configuration array.
integer$prioritiesMessage priority
array$categoriesTypes of entry
boolean$excludeIf true, all categories will be logged except those in the $categories array
Renvoie
void
Depuis
1.7.0

Références $options, et elseif.

◆ createDelegatedLogger()

static createDelegatedLogger ( )
static

Creates a delegated PSR-3 compatible logger from the current singleton instance. This method always returns a new delegated logger.

Renvoie
DelegatingPsrLogger
Depuis
3.8.0

Référencé par Task\__construct(), et Logger\register().

◆ findLoggers()

findLoggers (   $priority,
  $category 
)
protected

Method to find the loggers to use based on priority and category values.

Paramètres
integer$priorityMessage priority.
string$categoryType of entry
Renvoie
array The array of loggers to use for the given priority and category values.
Depuis
1.7.0

Références $category, et Log\$loggers.

Référencé par Log\addLogEntry().

◆ registerLogger()

registerLogger ( string  $key,
string  $class,
bool  $replace = false 
)

Register a logger to the registry

Paramètres
string$keyThe service key to be registered
string$classThe class name of the logger
boolean$replaceFlag indicating the service key may replace an existing definition
Renvoie
void
Depuis
4.0.0

Références $class, et $key.

◆ setInstance()

static setInstance (   $instance)
static

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ètres
Log$instanceThe logging object instance to be used by the static methods.
Renvoie
void
Depuis
1.7.0

Références Log\$instance, et null.

Documentation des champs

◆ $configurations

$configurations = array()
protected

◆ $instance

$instance
staticprotected

Référencé par Log\setInstance().

◆ $loggerRegistry

$loggerRegistry
protected

◆ $loggers

$loggers = array()
protected

Référencé par Log\addLogEntry(), et Log\findLoggers().

◆ $lookup

$lookup = array()
protected

◆ ALERT

◆ ALL

◆ CRITICAL

◆ DEBUG

◆ EMERGENCY

◆ ERROR

◆ INFO

◆ NOTICE

◆ WARNING

const WARNING = 16

Référencé par Authentication\__construct(), InstallerExtension\__construct(), TaskOption\__get(), FileStorage\_deleteFolder(), FileStorage\_filesInFolder(), FileStorage\_folders(), Editor\_loadEditor(), FtpClient\_mode(), FtpClient\_passive(), FtpClient\_putCmd(), ContactController\_sendEmail(), FtpClient\_verifyResponse(), Installer\abort(), RegistrationModel\activate(), UserHelper\activateUser(), MessagequeueLogger\addEntry(), File\append(), Authentication\authenticate(), FtpClient\chdir(), FtpClient\chmod(), FtpClient\connect(), File\copy(), Installer\copyFiles(), Folder\create(), FtpClient\create(), Factory\createMailer(), DaemonApplication\daemonize(), MessageModel\delete(), HistoryModel\delete(), File\delete(), Folder\delete(), FtpClient\delete(), AdminModel\delete(), InstallerHelper\detectType(), LanguageAdapter\discover_install(), XmlView\display(), InstallerHelper\downloadPackage(), Folder\files(), ComponentAdapter\finaliseUninstall(), Installer\findManifest(), Folder\folders(), FtpClient\get(), Access\getAssetRules(), CMSApplication\getCfg(), SysinfoModel\getExtensions(), MultilangstatusHelper\getModule(), CategoryField\getOptions(), PluginsField\getOptions(), UpdateAdapter\getUpdateSiteResponse(), ExceptionHandler\handleUserDeprecatedErrors(), DaemonApplication\isActive(), HistoryModel\keep(), FtpClient\listDetails(), FtpClient\listNames(), User\load(), Toolbar\loadButtonType(), Changelog\loadFromXml(), Update\loadFromXml(), FtpClient\login(), Joomla\Component\Scheduler\Administrator\Traits\logTask(), FtpClient\mkdir(), File\move(), Installer\parseFiles(), Installer\parseLanguages(), Installer\parseMedia(), Installer\parseQueries(), Installer\parseSchemaUpdates(), Installer\parseSQLFiles(), FileAdapter\populateFilesAndFolderList(), InstallerScript\preflight(), RemindModel\processRemindRequest(), ResetModel\processResetRequest(), ItemsController\publish(), MessageModel\publish(), AdminModel\publish(), FtpClient\pwd(), FtpClient\read(), ModuleAdapter\refreshManifestCache(), LibraryAdapter\refreshManifestCache(), FileAdapter\refreshManifestCache(), PluginAdapter\refreshManifestCache(), TemplateAdapter\refreshManifestCache(), PackageAdapter\refreshManifestCache(), LanguageAdapter\refreshManifestCache(), ComponentAdapter\refreshManifestCache(), RegistrationModel\register(), FtpClient\reinit(), LanguageAdapter\removeExtensionFiles(), TemplateAdapter\removeExtensionFiles(), PackageAdapter\removeExtensionFiles(), Installer\removeFiles(), FtpClient\rename(), AdminModel\reorder(), FtpClient\restart(), ApplicationModel\save(), MessageModel\save(), AdminModel\saveorder(), MailModel\send(), Email\sendCode(), WorkflowModel\setDefault(), StageModel\setDefault(), Mail\setSender(), FtpClient\store(), FtpClient\syst(), InstallerAdapter\uninstall(), File\upload(), File\write(), et FtpClient\write().


La documentation de cette classe a été générée à partir du fichier suivant :