Support Joomla!

Packages

Package: Joomla-Framework

License

Content on this site is copyright © 2005 - 2008 Open Source Matters Inc and can be used in accordance with the Joomla! Electronic Documentation License. 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

  • since: 1.5

Located in /joomla/error/log.php (line 28)

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

Log File Pointer

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

Log Format

string $_path (line 40)

Log File Path

Inherited Variables

Inherited from JObject

Variable JObject::$_errors
Methods
Constructor __construct (line 56)

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

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

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 Sat, 14 Nov 2009 11:15:35 +0000 by phpDocumentor 1.3.1