API15

JLog: Difference between revisions

From Joomla! Documentation

Doxiki (talk | contribs)
New page: <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki> </span> {{Description:JLog}} ===Defined in=== libraries/j...
 
Doxiki (talk | contribs)
No edit summary
Line 24: Line 24:
|Returns a reference to the global log object, only creating it if it doesn't already exist.
|Returns a reference to the global log object, only creating it if it doesn't already exist.
|}
|}
===Importing===
===Importing===
<source lang="php">jimport( 'joomla.error.log' );</source>
<source lang="php">jimport( 'joomla.error.log' );</source>

Revision as of 17:35, 25 March 2010

[Edit Descripton] Template:Description:JLog

Defined in

libraries/joomla/error/log.php

Methods

Method name Description
__construct Constructor
setOptions Set log file options
addEntry
getInstance Returns a reference to the global log object, only creating it if it doesn't already exist.

Importing

jimport( 'joomla.error.log' );

[Edit See Also] Template:SeeAlso:JLog

Examples

<CodeExamplesForm />

No Title

 
jimport('joomla.error.log');
$log = &JLog::getInstance();
$log->addEntry(array('LEVEL' => '1','STATUS' => 'SOME ERROR:','COMMENT' =>'some comment'));