Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: Joomla-Framework

Developer Network License

The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5

 Class JLog

Description

Joomla! Logging class

This class is designed to build log files based on the W3C specification at: http://www.w3.org/TR/WD-logfile.html

Located in /joomla/utilities/log.php (line 29)

Class JObject   (Subpackage Base)

Class JLog   (Subpackage Utilities)
Variable Summary
Variable resource $_file
Variable string $_format
Variable string $_path
Method Summary
Static method static object The &getInstance ([ $file = 'error.php'], [ $options = null], [ $path = null])
Constructor JLog __construct (string $path, array $options)
Method void addEntry ( $entry)
Method boolean setOptions (array $options)
Method boolean _closeLog ()
Method boolean _openLog ()
Variables
resource $_file (line 35)

Log File Pointer

string $_format = "{DATE}\t{TIME}\t{LEVEL}\t{C-IP}\t{STATUS}\t{COMMENT}" (line 47)

Log Format

string $_path (line 41)

Log File Path

Methods
Constructor __construct (line 57)

Constructor

  • since: 1.5
  • access: protected
JLog __construct (string $path, array $options)
  • string $path: Log file path
  • array $options: Log file options

Redefinition of:
JObject::__construct()
Class constructor, overridden in descendant classes.
addEntry (line 116)
void addEntry ( $entry)
  • $entry
getInstance (line 75)

Returns a reference to the global log object, only creating it if it doesn't already exist.

This method must be invoked as:

  $log = & JLog::getInstance();

  • return: JLog object.
  • since: 1.5
object The &getInstance ([ $file = 'error.php'], [ $options = null], [ $path = null])
  • $file
  • $options
  • $path
setOptions (line 108)

Set log file options

  • return: True if successful
  • since: 1.5
  • access: public
boolean setOptions (array $options)
  • array $options: Associative array of options to set
_closeLog (line 220)

Close the log file pointer

  • return: True on success
  • since: 1.5
  • access: public
boolean _closeLog ()
_openLog (line 163)

Open the log file pointer and create the file if it doesn't exist

  • return: True on success
  • since: 1.5
  • access: public
boolean _openLog ()

Inherited Methods

Inherited From JObject

 JObject::JObject()
 JObject::__construct()
 JObject::get()
 JObject::getPublicProperties()
 JObject::set()
 JObject::toString()

Documentation generated on Mon, 05 Mar 2007 21:09:58 +0000 by phpDocumentor 1.3.1