API16

Difference between revisions of "JLog"

From Joomla! Documentation

(New page: <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki> </span> {{Description:JLog}} ===Defined in=== libraries/j...)
 
Line 34: Line 34:
  
 
===Examples===
 
===Examples===
<CodeExamplesForm />
+
<source lang="php">
<dpl>
+
jimport('joomla.error.log');
noresultsheader=\n
+
 
category=JLog
+
$log = &JLog::getInstance();
category=CodeExample
+
$log->addEntry(array('message' =>'my message'));
category=ClassExample
+
</source>
include=*
 
format= ,,,
 
</dpl>
 

Revision as of 10:52, 1 September 2011

The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

[Edit Descripton] Template:Description:JLog

Defined in[edit]

libraries/joomla/error/log.php

Methods[edit]

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

Importing[edit]

jimport( 'joomla.error.log' );

[Edit See Also] Template:SeeAlso:JLog

Examples[edit]

jimport('joomla.error.log');

$log = &JLog::getInstance();
$log->addEntry(array('message' =>'my message'));