Class: XoopsLogger

Source Location: /class/logger.php

Class XoopsLogger

Class Overview

Collects information for a page request

Records information about database queries, blocks, and execution time and can display it as HTML. It also catches php runtime errors.

Located in /class/logger.php [line 25]



		
		
		

		

Properties

Methods

[ Top ]
Descendants
Child Class Description
XoopsErrorHandler Backward compatibility code, do not use this class directly

[ Top ]
Property Summary
mixed   $activated  
array   $blocks  
array   $errors  
array   $extra  
array   $logend  
array   $logstart  
array   $queries  
mixed   $renderingEnabled  
mixed   $usePopup  

[ Top ]
Method Summary
XoopsLogger   XoopsLogger()  
void   addBlock()   Log display of a block
void   addExtra()   Log extra information
void   addQuery()   Log a database query
void   disableLogger()   Disabling logger for some special occasion like AJAX requests and XML
void   disableRendering()   Disable logger output rendering.
void   dump()  
void   dumpAll()  
void   dumpBlocks()  
void   dumpExtra()  
void   dumpQueries()  
float   dumpTime()   get the current execution time of a timer
void   enableRendering()   Enable logger output rendering When output rendering is enabled, the logger will insert its output within the page content.
void   handleError()   Error handling callback (called by the zend engine)
object XoopsLogger   &instance()   Get a reference to the only instance of this class
float   microtime()   Returns the current microtime in seconds.
void   render()   Output buffering callback inserting logger dump in page output
void   sanitizePath()  
void   startTime()   Start a timer
void   stopTime()   Stop a timer

[ Top ]
Properties
mixed   $activated = true [line 38]

[ Top ]
array   $blocks = array() [line 30]

[ Top ]
array   $errors = array() [line 34]

[ Top ]
array   $extra = array() [line 31]

[ Top ]
array   $logend = array() [line 33]

[ Top ]
array   $logstart = array() [line 32]

[ Top ]
array   $queries = array() [line 29]

[ Top ]
mixed   $renderingEnabled = false [line 41]
API Tags:
Access:  protected


[ Top ]
mixed   $usePopup = false [line 37]

[ Top ]
Methods
Constructor XoopsLogger  [line 43]

  XoopsLogger XoopsLogger( )



[ Top ]
addBlock  [line 130]

  void addBlock( string $name, [bool $cached = false], [int $cachetime = 0]  )

Log display of a block

Parameters:
string   $name:  name of the block
bool   $cached:  was the block cached?
int   $cachetime:  cachetime of the block


[ Top ]
addExtra  [line 138]

  void addExtra( string $name, int $msg  )

Log extra information

Parameters:
string   $name:  name for the entry
int   $msg:  text message for the entry


[ Top ]
addQuery  [line 118]

  void addQuery( string $sql, [string $error = null], [int $errno = null]  )

Log a database query

Parameters:
string   $sql:  SQL string
string   $error:  error message (if any)
int   $errno:  error number (if any)


[ Top ]
disableLogger  [line 86]

  void disableLogger( )

Disabling logger for some special occasion like AJAX requests and XML

When the logger absolutely needs to be disabled whatever it is enabled or not in the preferences and wether user has permission or not to view it



[ Top ]
disableRendering  [line 74]

  void disableRendering( )

Disable logger output rendering.



[ Top ]
dump  [line 218]

  void dump( [ $mode = '']  )

Parameters:
   $mode: 

API Tags:
Access:  protected


[ Top ]
dumpAll  [line 239]

  void dumpAll( )


API Tags:
Deprecated:  


[ Top ]
dumpBlocks  [line 240]

  void dumpBlocks( )


API Tags:
Deprecated:  


[ Top ]
dumpExtra  [line 241]

  void dumpExtra( )


API Tags:
Deprecated:  


[ Top ]
dumpQueries  [line 242]

  void dumpQueries( )


API Tags:
Deprecated:  


[ Top ]
dumpTime  [line 228]

  float dumpTime( [string $name = 'ICMS']  )

get the current execution time of a timer

Parameters:
string   $name:  name of the counter

API Tags:
Return:  current execution time of the counter
Access:  protected


[ Top ]
enableRendering  [line 65]

  void enableRendering( )

Enable logger output rendering When output rendering is enabled, the logger will insert its output within the page content.

If the string <!--{xo-logger-output}--> is found in the page content, the logger output will replace it, otherwise it will be inserted after all the page output.



[ Top ]
handleError  [line 145]

  void handleError( $errno, $errstr, $errfile, $errline  )

Error handling callback (called by the zend engine)

Parameters:
   $errno: 
   $errstr: 
   $errfile: 
   $errline: 


[ Top ]
instance  [line 49]

  object XoopsLogger &instance( )

Get a reference to the only instance of this class


API Tags:
Return:  reference to the only instance


[ Top ]
microtime  [line 94]

  float microtime( )

Returns the current microtime in seconds.



[ Top ]
render  [line 192]

  void render( $output  )

Output buffering callback inserting logger dump in page output

Parameters:
   $output: 


[ Top ]
sanitizePath  [line 180]

  void sanitizePath( $path  )

Parameters:
   $path: 

API Tags:
Access:  protected


[ Top ]
startTime  [line 102]

  void startTime( [string $name = 'ICMS']  )

Start a timer

Parameters:
string   $name:  name of the timer


[ Top ]
stopTime  [line 109]

  void stopTime( [string $name = 'ICMS']  )

Stop a timer

Parameters:
string   $name:  name of the timer


[ Top ]

Documentation generated on Sat, 15 Nov 2008 14:19:04 -0600 by phpDocumentor 1.4.1