API15

Difference between revisions of "JLog"

From Joomla! Documentation

m (preparing for archive only)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[Description:JLog|Edit Descripton]]<nowiki>]</nowiki>
 
</span>
 
{{Description:JLog}}
 
 
 
===Defined in===
 
===Defined in===
 
libraries/joomla/error/log.php
 
libraries/joomla/error/log.php
Line 28: Line 23:
 
<source lang="php">jimport( 'joomla.error.log' );</source>
 
<source lang="php">jimport( 'joomla.error.log' );</source>
  
<span class="editsection" style="font-size:76%;">
+
 
<nowiki>[</nowiki>[[SeeAlso:JLog|Edit See Also]]<nowiki>]</nowiki>
+
 
</span>
 
{{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 19:56, 24 March 2017

The "API15" 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.

Defined in[edit]

libraries/joomla/error/log.php

Methods[edit]

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[edit]

jimport( 'joomla.error.log' );



Examples[edit]

Code Examples[edit]

No Title

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