Back to Joomla project (class list)

Class FormattedtextLogger - list of methods

Joomla! Formatted Text File Log class
This class is designed to use as a base for building formatted text files for output. By default it emulates the Syslog style format output. This is a disk based output format.

Extends

Direct known subclasses

Package: Joomla\CMS\Log\Logger
Copyright: (C) 2011 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Log/Logger/FormattedtextLogger.php
Project: Joomla

Method Summary

public
(array &$options)

Constructor.
Parameters
  • array & $options Log object options.
Since
  • 1.7.0
Show source code of this method: __construct Source Code

public
()

If deferred, write all pending logs.
Since
  • 3.9.0
Show source code of this method: __destruct Source Code

public void
(\Joomla\CMS\Log\LogEntry $entry)

Method to add an entry to the log.
Parameters
  • \Joomla\CMS\Log\LogEntry $entry The log entry object to add to the log.
Returns
  • void
Since
  • 1.7.0
-
  • \RuntimeException
Show source code of this method: addEntry Source Code

protected string
(\Joomla\CMS\Log\LogEntry $entry)

Format a line for the log file.
Parameters
  • \Joomla\CMS\Log\LogEntry $entry The log entry to format as a string.
Returns
  • string
Since
  • 3.9.0
Show source code of this method: formatLine Source Code

protected string
()

Method to generate the log file header.
Returns
  • string The log file header
Since
  • 1.7.0
Show source code of this method: generateFileHeader Source Code

protected void
()

Method to initialise the log file. This will create the folder path to the file if it doesn't already exist and also get a new file header if the file doesn't already exist. If the file already exists it will simply open it for writing.
Returns
  • void
Since
  • 1.7.0
-
  • \RuntimeException
Show source code of this method: initFile Source Code

protected void
()

Method to parse the format string into an array of fields.
Returns
  • void
Since
  • 1.7.0
Show source code of this method: parseFields Source Code

Properties Summary

protected string
$format
The format which each entry follows in the log file.
Since
  • 1.7.0
protected array
$fields
The parsed fields from the format string.
Since
  • 1.7.0
protected string
$path
The full filesystem path for the log file.
Since
  • 1.7.0
protected bool
$defer
If true, all writes will be deferred as long as possible.
Since
  • 3.9.0
protected array
$deferredEntries
If deferring, entries will be stored here prior to writing.
Since
  • 3.9.0

Tags Summary

Since
1.7.0