API15

JLog: Difference between revisions

From Joomla! Documentation

m clean up
m preparing for archive only
 
Line 1: Line 1:
{{subst:Description:JLog}}
===Defined in===
===Defined in===
libraries/joomla/error/log.php
libraries/joomla/error/log.php
Line 26: Line 24:




{{subst:SeeAlso:JLog}}
 


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=JLog
  category=JLog
  category=CodeExample
  namespace=CodeExample
  category=ClassExample
  category=ClassExample
  include=*
  include=*
  format= ,,,
  format= ,,,
</dpl>
</dpl>

Latest revision as of 00:56, 25 March 2017

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' );



Examples

Code Examples

No Title

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