Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: Joomla-Framework

License

Content on this site is copyright © 2005 - 2008 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5. Some parts of this website may be subject to other licenses.

 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/error/log.php (line 29)

Class JObject   (Subpackage Base)

Class JLog   (Subpackage Error)
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

Inherited Variables

Inherited from JObject

Variable JObject::$_errors
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 118)
void addEntry ( $entry)
  • $entry
getInstance (line 76)

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
  • access: public
object The &getInstance ([ $file = 'error.php'], [ $options = null], [ $path = null])
  • $file
  • $options
  • $path
setOptions (line 110)

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 223)

Close the log file pointer

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

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::getError()
 JObject::getErrors()
 JObject::getProperties()
 JObject::getPublicProperties()
 JObject::set()
 JObject::setError()
 JObject::setProperties()
 JObject::toString()

Documentation generated on Tue, 29 Jan 2008 18:48:13 +0000 by phpDocumentor 1.3.1