Overview

Packages

  • Auth
    • Ads
    • Ldap
    • Xoops
  • Autotasks
  • Config
    • Category
    • Item
    • Option
  • Core
    • Filesystem
    • Filters
    • Logger
    • Mail
    • Message
    • Password
    • Security
    • StopSpammer
    • Template
    • Textsanitizer
    • VersionChecker
  • Data
    • Avatar
    • Comment
  • Database
    • Connection
    • Criteria
    • Legacy
    • MySQL
    • PDO
    • Updater
  • Feeds
    • RSS
  • File
  • Form
    • Base
    • Elements
  • ICMS
    • IPF
      • View
  • Image
    • Category
  • Ipf
    • Category
    • Controller
    • Export
    • form
    • Keyhighlighter
    • Member
    • Object
    • Permission
    • richfile
    • Tree
    • urllink
    • View
  • kernel
    • Set
  • Member
    • Group
    • GroupMembership
    • GroupPermission
    • User
  • Messaging
  • Module
  • None
  • Notification
  • Page
  • Plugins
    • Editor
  • Preload
    • Libraries
  • Privmessage
  • Session
  • SmartObject
  • View
    • Block
    • Breadcrumb
    • PageNav
    • PrinterFriendly
    • Template
    • Templates
    • Theme
    • Tree

Classes

  • icms_core_Logger
  • Overview
  • Package
  • Class

Class icms_core_Logger

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.

Package: Core\Logger
Category: ICMS
Copyright: The XOOPS project http://www.xoops.org/
Copyright: http://www.impresscms.org/ The ImpressCMS Project
License: GNU public license
License: GNU General Public License (GPL)
Author: Kazumi Ono onokazu@xoops.org
Author: Skalpa Keo skalpa@xoops.org
Since: XOOPS
Located at core/Logger.php
Methods summary
public static object &
# instance( )

Get a reference to the only instance of this class

Get a reference to the only instance of this class

Returns

object
icms_core_Logger (@link icms_core_Logger) reference to the only instance
public
# activate( boolean $showErrors = false )

This was added in 1.3 because there was a separate class - XoopsErrorHandler - having the additional class is unnecessary and the methods existed in other forms.

This was added in 1.3 because there was a separate class - XoopsErrorHandler - having the additional class is unnecessary and the methods existed in other forms.

Deprecated

Use $activated = TRUE/FALSE, instead

Parameters

$showErrors
public
# enableRendering( )

Enable logger output rendering When output rendering is enabled, the logger will insert its output within the page content. If the string is found in the page content, the logger output will replace it, otherwise it will be inserted after all the page output.

Enable logger output rendering When output rendering is enabled, the logger will insert its output within the page content. If the string is found in the page content, the logger output will replace it, otherwise it will be inserted after all the page output.

public
# disableRendering( )

Disable logger output rendering.

Disable logger output rendering.

public
# disableLogger( )

Disabling logger for some special occasion like AJAX requests and XML

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 whether user has permission or not to view it

public
# startTime( string $name = 'ICMS' )

Start a timer

Start a timer

Parameters

$name
name of the timer
public
# stopTime( string $name = 'ICMS' )

Stop a timer

Stop a timer

Parameters

$name
name of the timer
public
# addQuery( string $sql, string $error = null, integer $errno = null )

Log a database query

Log a database query

Parameters

$sql
SQL string
$error
error message (if any)
$errno
error number (if any)
public
# addBlock( string $name, boolean $cached = false, integer $cachetime = 0 )

Log display of a block

Log display of a block

Parameters

$name
name of the block
$cached
was the block cached?
$cachetime
cachetime of the block
public
# addExtra( string $name, integer $msg )

Log extra information

Log extra information

Parameters

$name
name for the entry
$msg
text message for the entry
public
# addDeprecated( $msg )
public
# addFilter( string $name, string $filter_message )

Log display of filters

Log display of filters

Parameters

$name
name/id of the content
$filter_message
message displayed
public
# handleException( Exception $exception )

Handle exception

Handle exception

Parameters

$exception
public
# handleError( string $errno, string $errstr, string $errfile, string $errline )

Error handling callback (called by the zend engine)

Error handling callback (called by the zend engine)

Parameters

$errno
$errstr
$errfile
$errline
public string
# sanitizePath( string $path )

Sanitize path / url to file in erorr report

Sanitize path / url to file in erorr report

Parameters

$path
path to sanitize

Returns

string
$path sanitized path
public string
# render( string $output )

Output buffering callback inserting logger dump in page output Determines wheter output can be shown (based on permissions)

Output buffering callback inserting logger dump in page output Determines wheter output can be shown (based on permissions)

Parameters

$output

Returns

string
$output
public string
# dump( string $mode = '' )

dump the logger output

dump the logger output

Parameters

$mode

Returns

string
$ret
public float
# dumpTime( string $name = 'ICMS' )

get the current execution time of a timer

get the current execution time of a timer

Parameters

$name
name of the counter

Returns

float
current execution time of the counter
public string
# dumpAll( )

dumpAll

dumpAll

Deprecated

Use dump('') instead

Returns

string
public unknown
# dumpBlocks( )

dumpBlocks

dumpBlocks

Deprecated

Use dump('blocks'), instead

Returns

unknown
public unknown
# dumpExtra( )

dumpExtra

dumpExtra

Deprecated

Use dump('extra'), instead

Returns

unknown
public unknown
# dumpQueries( )

dumpQueries

dumpQueries

Deprecated

Use dump('queries'), instead

Returns

unknown
public unknown
# dumpFilters( )

dumpFilters

dumpFilters

Deprecated

Use dump('blocks'), instead

Returns

unknown
public string
# renderErrors( )

Render the list of errors This was added in 1.3 because there was a separate class - XoopsErrorHandler - having the additional class is unnecessary and the methods existed in other forms.

Render the list of errors This was added in 1.3 because there was a separate class - XoopsErrorHandler - having the additional class is unnecessary and the methods existed in other forms.

Deprecated

use dump('errors'), instead

Returns

string
$list of errors
Properties summary
public array $queries
# array()
public array $blocks
# array()
public array $extra
# array()
public array $logstart
# array()
public array $logend
# array()
public array $errors
# array()
public array $deprecated
# array()
public array $filters
# array()
public boolean $usePopup
# false
public boolean $activated
# true
API documentation generated by ApiGen