Class JLoggerFormattedText

Description

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.

  • since: 11.1

Located in /libraries/joomla/log/loggers/formattedtext.php (line 25)

JLogger
   |
   --JLoggerFormattedText
Direct descendents
Class Description
JLoggerW3C Joomla! W3C Logging class
Variable Summary
array $fields
resource $file
string $format
string $path
array $priorities
Method Summary
JLoggerFormattedText __construct (array &$options)
void __destruct ()
boolean addEntry (JLogEntry $entry)
string generateFileHeader ()
void initFile ()
void parseFields ()
Variables
array $fields = array() (line 44)
  • var: The parsed fields from the format string.
  • since: 11.1
  • access: protected
resource $file (line 31)
  • var: The file pointer for the log file.
  • since: 11.1
  • access: protected
string $format = '{DATETIME} {PRIORITY} {CATEGORY} {MESSAGE}' (line 38)
  • var: The format for which each entry follows in the log file. All fields must be named in all caps and be within curly brackets eg. {FOOBAR}.
  • since: 11.1
  • access: protected

Redefined in descendants as:
string $path (line 50)
  • var: The full filesystem path for the log file.
  • since: 11.1
  • access: protected
array $priorities = array(
JLog::EMERGENCY => 'EMERGENCY',
JLog::ALERT => 'ALERT',
JLog::CRITICAL => 'CRITICAL',
JLog::ERROR => 'ERROR',
JLog::WARNING => 'WARNING',
JLog::NOTICE => 'NOTICE',
JLog::INFO => 'INFO',
JLog::DEBUG => 'DEBUG')
(line 56)
  • var: Translation array for JLogEntry priorities to text strings.
  • since: 11.1
  • access: protected

Inherited Variables

Inherited from JLogger

JLogger::$options
Methods
Constructor __construct (line 73)

Constructor.

  • since: 11.1
  • access: public
JLoggerFormattedText __construct (array &$options)
  • array &$options: Log object options.

Redefinition of:
JLogger::__construct()
Constructor.

Redefined in descendants as:
Destructor __destruct (line 114)

Destructor.

  • since: 11.1
  • access: public
void __destruct ()
addEntry (line 132)

Method to add an entry to the log.

  • return: True on success.
  • since: 11.1
  • throws: LogException
  • access: public
boolean addEntry (JLogEntry $entry)
  • JLogEntry $entry: The log entry object to add to the log.

Redefinition of:
JLogger::addEntry()
Method to add an entry to the log.
generateFileHeader (line 196)

Method to generate the log file header.

  • return: The log file header
  • since: 11.1
  • access: protected
string generateFileHeader ()
initFile (line 230)

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.

  • since: 11.1
  • access: protected
void initFile ()
parseFields (line 268)

Method to parse the format string into an array of fields.

  • since: 11.1
  • access: protected
void parseFields ()

Inherited Methods

Inherited From JLogger

JLogger::__construct()
JLogger::addEntry()

Documentation generated on Mon, 25 Jun 2012 13:54:58 -0500 by phpDocumentor 1.4.4