Class JLogLoggerFormattedtext

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/logger/formattedtext.php (line 24)

JLogLogger
   |
   --JLogLoggerFormattedtext
Direct descendents
Class Description
 class JLogLoggerW3c Joomla! W3c Logging class
Variable Summary
 array $fields
 resource $file
 string $format
 string $path
Method Summary
 JLogLoggerFormattedtext __construct (array &$options)
 void __destruct ()
 boolean addEntry (JLogEntry $entry)
 string generateFileHeader ()
 void initFile ()
 void parseFields ()
Variables
array $fields = array() (line 43)
  • var: The parsed fields from the format string.
  • since: 11.1
  • access: protected
resource $file (line 30)
  • var: The file pointer for the log file.
  • since: 11.1
  • access: protected
string $format = '{DATETIME} {PRIORITY} {CATEGORY} {MESSAGE}' (line 37)
  • 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 49)
  • var: The full filesystem path for the log file.
  • since: 11.1
  • access: protected

Inherited Variables

Inherited from JLogLogger

JLogLogger::$options
JLogLogger::$priorities
Methods
Constructor __construct (line 58)

Constructor.

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

Redefinition of:
JLogLogger::__construct()
Constructor.

Redefined in descendants as:
Destructor __destruct (line 99)

Destructor.

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

Method to add an entry to the log.

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

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

Method to generate the log file header.

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

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
  • throws: RuntimeException
  • access: protected
void initFile ()
parseFields (line 254)

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

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

Inherited Methods

Inherited From JLogLogger

 JLogLogger::__construct()
 JLogLogger::addEntry()

Documentation generated on Tue, 19 Nov 2013 15:03:45 +0100 by phpDocumentor 1.4.3