Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
eZDebug Class Reference
Utility classes

Advanced debug/log system. More...

## Public Member Functions
| __construct ()
| reset ()
| messageName ( $messageType)
| recursionProtectErrorHandler ( $errno, $errstr, $errfile, $errline)
| errorHandler ( $errno, $errstr, $errfile, $errline)
| setMessageOutput ( $output)
| setStoreLog ( $store)
| isLogFileEnabled ( $type)
| isGlobalLogFileEnabled ()
| setIsLogFileEnabled ( $type, $enabled)
| setIsGlobalLogFileEnabled ( $enabled)
| setLogOnly ( $enabled)
| messageTypes ()
| logFiles ()
| isDebugAllowed ()

## Static Public Member Functions
static | instance ()
static | showMessage ( $type)
static | alwaysLogMessage ( $level)
static | setHandleType ( $type)
static | showTypes ( $types=false)
static | writeStrict ( $string, $label="", $backgroundClass="")
static | writeNotice ( $string, $label="", $backgroundClass="")
static | writeWarning ( $string, $label="", $backgroundClass="")
static | writeError ( $string, $label="", $backgroundClass="")
static | writeDebug ( $string, $label="", $backgroundClass="")
static | setUseExternalCSS ( $use)
static | addTimingPoint ( $description="")
static | maxLogSize ()
static | setMaxLogSize ( $size)
static | maxLogrotateFiles ()
static | setLogrotateFiles ( $files)
static | rotateLog ( $fileName)
static | setLogFileEnabled ( $enabled, $types=false)
static | isDebugEnabled ()
static | isLogOnlyEnabled ()
static | isIPInNet ( $ipaddress, $network, $mask=24)
static | updateSettings ( $settings)
static | checkDebugByUser ()
static | printReport ( $newWindow=false, $as_html=true, $returnReport=false, $allowedDebugLevels=false, $useAccumulators=true, $useTiming=true, $useIncludedFiles=false)
static | setScriptStart ( $time=false)
static | setScriptStop ( $time=false)
static | createAccumulatorGroup ( $key, $name=false)
static | createAccumulator ( $key, $inGroup=false, $name=false)
static | accumulatorStart ( $key, $inGroup=false, $name=false, $recursive=false)
static | accumulatorStop ( $key, $recursive=false)
static | appendTopReport ( $reportName, $reportContent)
static | printTopReportsList ()
static | appendBottomReport ( $reportName, $reportContent)
static | printBottomReportsList ( $as_html=true)
static | exceptionErrorHandler ( $errno, $errstr, $errfile, $errline)

## Public Attributes
| $StoreLog
const | LEVEL_NOTICE = 1
const | LEVEL_WARNING = 2
const | LEVEL_ERROR = 3
const | LEVEL_TIMING_POINT = 4
const | LEVEL_DEBUG = 5
const | LEVEL_STRICT = 6
const | SHOW_NOTICE = 1
const | SHOW_WARNING = 2
const | SHOW_ERROR = 4
const | SHOW_TIMING_POINT = 8
const | SHOW_DEBUG = 16
const | SHOW_STRICT = 32
const | SHOW_ALL = 63
const | HANDLE_NONE = 0
const | HANDLE_FROM_PHP = 1
const | HANDLE_TO_PHP = 2
const | HANDLE_EXCEPTION = 3
const | OUTPUT_MESSAGE_SCREEN = 1
const | OUTPUT_MESSAGE_STORE = 2
const | MAX_LOGFILE_SIZE = 204800
const | MAX_LOGROTATE_FILES = 3
const | XDEBUG_SIGNATURE = '--XDEBUG--'
| $DebugStrings = array()
| $TimePoints = array()
| Array which contains the time points. More...
| $TmpTimePoints
| Array which contains the temporary time points. More...
| $TimeAccumulatorList = array()
| Array wich contains time accumulators. More...
| $ShowTypes
| Determines which debug messages should be shown. More...
| $HandleType
| Determines what to do with php errors, ignore, fetch or output. More...
| $OutputFormat
| An array of the outputformats for the different debug levels. More...
| $LogFiles
| An array of logfiles used by the debug class with each key being the debug level. More...
| $TimingAccuracy = 4
| How many places behind . should be displayed when showing times. More...
| $PercentAccuracy = 4
| How many places behind . should be displayed when showing percentages. More...
| $UseCSS
| Whether to use external CSS or output own CSS. True if external is to be used. More...
| $MessageOutput
| Determines how messages are output (screen/log) More...
| $MessageTypes
| A list of message types. More...
| $LogFileEnabled
| A map with message types and whether they should do file logging. More...
| $GlobalLogFileEnabled
| Controls whether logfiles are used at all. More...
| $ScriptStart
| The time when the script was started. More...
| $ScriptStop
| $OverrideList
| A list of override directories. More...
| $bottomReportsList
| A list of debug reports that appears at the bottom of debug output. More...
| $topReportsList
| A list of debug reports that appears at the top of debug output. More...
| $MessageNames
| $AlwaysLog
| $OldHandler
| $TimeAccumulatorGroupList

## Private Member Functions
| write ( $string, $verbosityLevel=self::LEVEL_NOTICE, $label="", $backgroundClass="", $alwaysLog=false)
| writeFile (&$logFileData, &$string, $verbosityLevel, $alwaysLog=false)
| printReportInternal ( $as_html=true, $returnReport=true, $allowedDebugLevels=false, $useAccumulators=true, $useTiming=true, $useIncludedFiles=false)

## Static Private Member Functions
static | dumpVariable ( $var)
static | isIPInNetIPv6 ( $ipAddress, $ipAddressRange)
static | packedToBin ( $packedIPAddress)
static | isAllowedByCurrentIP ( $allowedIpList)

## Private Attributes
| $recursionFlag = false

## Detailed Description

Advanced debug/log system.

The eZ debug library is used to handle debug information. It can display information on screen and/or write it to log files.

You can enable on-screen debug information for specific IP addresses.

Timing points can be placed in the code to time the different sections of code.

Each debug message can be turned on/off by using the showTypes() function.

PHP error messages can also be shown using setHandleType().

// write a temporary debug message
eZDebug::writeDebug( "Test" );
// write a notice
eZDebug::writeNotice( "Image found" );
// write a warning
eZDebug::writeWarning( "Image not found, using default" );
// write an error
eZDebug::writeError( "Object not found, bailing.." );
// add a timing points
eZDebug::addTimingPoint( "Module Found" );
//.... code
eZDebug::addTimingPoint( "Module loading" );
// print the results on screen.
eZDebug::printReport();
eZDebug\writeError
static writeError( $string, $label="", $backgroundClass="")
Definition: ezdebug.php:545
eZDebug\printReport
static printReport( $newWindow=false, $as_html=true, $returnReport=false, $allowedDebugLevels=false, $useAccumulators=true, $useTiming=true, $useIncludedFiles=false)
Definition: ezdebug.php:1224
eZDebug\writeDebug
static writeDebug( $string, $label="", $backgroundClass="")
Definition: ezdebug.php:588
eZDebug\writeNotice
static writeNotice( $string, $label="", $backgroundClass="")
Definition: ezdebug.php:459
eZDebug\writeWarning
static writeWarning( $string, $label="", $backgroundClass="")
Definition: ezdebug.php:502
eZDebug\addTimingPoint
static addTimingPoint( $description="")
Definition: ezdebug.php:676

Definition at line 56 of file ezdebug.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZDebug::__construct | ( |  | ) |

Creates a new debug object.

Definition at line 90 of file ezdebug.php.

References HANDLE_NONE, OUTPUT_MESSAGE_STORE, and SHOW_ALL.

## Member Function Documentation

## ◆ accumulatorStart()

static eZDebug::accumulatorStart | ( |  | $key,
|  |  | $inGroup = `false`,
|  |  | $name = `false`,
|  |  | $recursive = `false`
| ) |  |
| static

Starts an time count for the accumulator $key. You can also specify a name which will be displayed.

Definition at line 1361 of file ezdebug.php.

References instance(), and isDebugEnabled().

Referenced by eZPostgreSQLDB\__construct(), eZImageAliasHandler\aliasList(), eZMySQLiDB\arrayQuery(), eZPostgreSQLDB\arrayQuery(), eZSQLite3DB\arrayQuery(), eZContentCacheManager\clearContentCache(), eZContentCacheManager\clearContentCacheIfNeeded(), eZContentCacheManager\clearNodeViewCacheArray(), eZContentCacheManager\clearObjectViewCache(), eZContentCacheManager\clearObjectViewCacheArray(), eZMySQLiDB\connect(), eZContentObjectAttribute\contentClassAttribute(), eZContentObjectAttribute\contentClassAttributeCanTranslate(), eZContentObjectAttribute\contentClassAttributeIsInformationCollector(), eZContentObjectAttribute\contentClassAttributeIsRequired(), eZContentObjectAttribute\contentClassAttributeName(), eZTextCodec\convertCodepage(), eZTextCodec\convertCodepageMapper(), eZTextCodec\convertCodepageRev(), eZTextCodec\convertCodepageToUnicode(), eZTextCodec\convertMBString(), eZTextCodec\convertString(), eZTextCodec\convertUnicodeToCodepage(), eZTextCodec\convertUnicodeToUTF8(), eZTextCodec\convertUTF8ToUnicode(), eZFSFileHandler\delete(), eZTemplate\fetch(), eZFSFileHandler\fetchContents(), eZFSFileHandler\fileCopy(), eZFSFileHandler\fileDelete(), eZFSFileHandler\fileDeleteByDirList(), eZFSFileHandler\fileDeleteByWildcard(), eZFSFileHandler\fileExists(), eZFSFileHandler\fileFetchContents(), eZFSFileHandler\fileLinkCopy(), eZFSFileHandler\fileMove(), eZFSFileHandler\fileStoreContents(), eZContentCacheManager\generateObjectViewCache(), eZTemplateDesignResource\handleResource(), eZTemplateFileResource\handleResourceData(), eZTSTranslator\initialize(), eZTemplate\loadAndRegisterFunctions(), eZFSFileHandler\loadMetaData(), eZTSTranslator\loadTranslationFile(), eZFSFileHandler\move(), eZTemplateMultiPassParser\parse(), eZFSFileHandler\passthrough(), eZTemplateDebugFunction\process(), eZMySQLiDB\query(), eZPostgreSQLDB\query(), eZSQLite3DB\query(), eZContentObject\stateIDArray(), eZContentObject\stateIdentifierArray(), and eZFSFileHandler\storeContents().

## ◆ accumulatorStop()

static eZDebug::accumulatorStop | ( |  | $key,
|  |  | $recursive = `false`
| ) |  |
| static

Stops a previous time count and adds the total time to the accumulator $key.

Definition at line 1389 of file ezdebug.php.

References instance(), isDebugEnabled(), and writeWarning().

Referenced by eZPostgreSQLDB\__construct(), eZImageAliasHandler\aliasList(), eZMySQLiDB\arrayQuery(), eZPostgreSQLDB\arrayQuery(), eZSQLite3DB\arrayQuery(), eZContentCacheManager\clearContentCache(), eZContentCacheManager\clearContentCacheIfNeeded(), eZContentCacheManager\clearNodeViewCacheArray(), eZContentCacheManager\clearObjectViewCache(), eZContentCacheManager\clearObjectViewCacheArray(), eZMySQLiDB\connect(), eZContentObjectAttribute\contentClassAttribute(), eZContentObjectAttribute\contentClassAttributeCanTranslate(), eZContentObjectAttribute\contentClassAttributeIsInformationCollector(), eZContentObjectAttribute\contentClassAttributeIsRequired(), eZContentObjectAttribute\contentClassAttributeName(), eZTextCodec\convertCodepage(), eZTextCodec\convertCodepageMapper(), eZTextCodec\convertCodepageRev(), eZTextCodec\convertCodepageToUnicode(), eZTextCodec\convertMBString(), eZTextCodec\convertString(), eZTextCodec\convertUnicodeToCodepage(), eZTextCodec\convertUnicodeToUTF8(), eZTextCodec\convertUTF8ToUnicode(), eZFSFileHandler\delete(), eZTemplate\fetch(), eZFSFileHandler\fetchContents(), eZFSFileHandler\fileCopy(), eZFSFileHandler\fileDelete(), eZFSFileHandler\fileDeleteByDirList(), eZFSFileHandler\fileDeleteByWildcard(), eZFSFileHandler\fileExists(), eZFSFileHandler\fileFetchContents(), eZFSFileHandler\fileLinkCopy(), eZFSFileHandler\fileMove(), eZFSFileHandler\fileStoreContents(), eZContentCacheManager\generateObjectViewCache(), eZTemplateDesignResource\handleResource(), eZTemplateFileResource\handleResourceData(), eZTSTranslator\initialize(), eZTemplate\loadAndRegisterFunctions(), eZFSFileHandler\loadMetaData(), eZTSTranslator\loadTranslationFile(), eZFSFileHandler\move(), eZTemplateMultiPassParser\parse(), eZFSFileHandler\passthrough(), eZTemplateDebugFunction\process(), eZMySQLiDB\query(), eZPostgreSQLDB\query(), eZSQLite3DB\query(), eZContentObject\stateIDArray(), eZContentObject\stateIdentifierArray(), and eZFSFileHandler\storeContents().

## ◆ addTimingPoint()

static eZDebug::addTimingPoint | ( |  | $description = `""` | ) |
| static

Adds a new timing point for the benchmark report.

Definition at line 676 of file ezdebug.php.

References instance(), isDebugEnabled(), and showMessage().

Referenced by eZDebugSetting\addTimingPoint(), eZTemplate\fetch(), eZTemplateMultiPassParser\parseIntoTextElements(), eZTemplateMultiPassParser\parseIntoTree(), eZTemplateMultiPassParser\parseWhitespaceRemoval(), and eZTemplateDebugFunction\process().

## ◆ alwaysLogMessage()

static eZDebug::alwaysLogMessage | ( |  | $level | ) |
| static

Returns
  `true` if the debug level $level should always log to file.

Definition at line 223 of file ezdebug.php.

References instance().

Referenced by writeDebug(), writeError(), writeNotice(), writeStrict(), and writeWarning().

## ◆ appendBottomReport()

static eZDebug::appendBottomReport | ( |  | $reportName,
|  |  | $reportContent
| ) |  |
| static

Appends report to 'bottom' reports list.

Definition at line 1892 of file ezdebug.php.

References instance().

## ◆ appendTopReport()

static eZDebug::appendTopReport | ( |  | $reportName,
|  |  | $reportContent
| ) |  |
| static

Appends report to 'top' reports list.

Definition at line 1870 of file ezdebug.php.

References instance().

## ◆ checkDebugByUser()

static eZDebug::checkDebugByUser | ( |  | ) |
| static

Final checking for debug by user id. Checks if we should enable debug.

Returns false if debug-by-user is not active, was already checked before or if there is no current user. Returns true otherwise.

Definition at line 1184 of file ezdebug.php.

References eZUser\currentUserID().

## ◆ createAccumulator()

static eZDebug::createAccumulator | ( |  | $key,
|  |  | $inGroup = `false`,
|  |  | $name = `false`
| ) |  |
| static

Creates a new accumulator entry if one does not already exist and initializes with default data. If $name is not supplied name is taken from $key. If $inGroup is supplied it will place the accumulator under the specified group.

Definition at line 1333 of file ezdebug.php.

References instance(), and isDebugEnabled().

## ◆ createAccumulatorGroup()

static eZDebug::createAccumulatorGroup | ( |  | $key,
|  |  | $name = `false`
| ) |  |
| static

Creates an accumulator group with key $key and group name $name. If $name is not supplied name is taken from $key.

Definition at line 1314 of file ezdebug.php.

References instance(), and isDebugEnabled().

Referenced by eZMySQLiDB\__construct(), eZPostgreSQLDB\__construct(), eZSQLite3DB\__construct(), eZTemplate\__construct(), and eZTSTranslator\initialize().

## ◆ dumpVariable()

static eZDebug::dumpVariable | ( |  | $var | ) |
| static private

Dumps the variables contents using the var_dump function

Definition at line 629 of file ezdebug.php.

References XDEBUG_SIGNATURE.

Referenced by writeDebug(), writeError(), writeNotice(), writeStrict(), eZPaymentLogger\writeString(), eZPaymentLogger\writeTimedString(), and writeWarning().

## ◆ errorHandler()

eZDebug::errorHandler | ( |  | $errno,
|  |  | $errstr,
|  |  | $errfile,
|  |  | $errline
| ) |  |

Handles PHP errors, creates notice, warning and error messages for the various PHP error types.

Definition at line 329 of file ezdebug.php.

References isDebugEnabled(), writeError(), writeNotice(), writeStrict(), and writeWarning().

Referenced by recursionProtectErrorHandler().

## ◆ exceptionErrorHandler()

static eZDebug::exceptionErrorHandler | ( |  | $errno,
|  |  | $errstr,
|  |  | $errfile,
|  |  | $errline
| ) |  |
| static

Exception based error handler, very basic

Since
  4.5

Exceptions

  ErrorException |

Definition at line 2003 of file ezdebug.php.

## ◆ instance()

static eZDebug::instance | ( |  | ) |
| static

Returns a shared instance of the eZDebug class.

Returns
  eZDebug

Definition at line 201 of file ezdebug.php.

Referenced by accumulatorStart(), accumulatorStop(), addTimingPoint(), alwaysLogMessage(), appendBottomReport(), appendTopReport(), createAccumulator(), createAccumulatorGroup(), eZDebugSetting\isConditionTrue(), printBottomReportsList(), printReport(), printTopReportsList(), setHandleType(), setLogFileEnabled(), setScriptStart(), setScriptStop(), setUseExternalCSS(), showMessage(), showTypes(), writeDebug(), writeError(), writeNotice(), writeStrict(), and writeWarning().

## ◆ isAllowedByCurrentIP()

static eZDebug::isAllowedByCurrentIP | ( |  | $allowedIpList | ) |
| static private

If debugging is allowed for the current IP address.

Parameters

  array | $allowedIpList |

Returns
  bool

Definition at line 1935 of file ezdebug.php.

References eZSys\clientIP(), and eZSys\isShellExecution().

## ◆ isDebugAllowed()

eZDebug::isDebugAllowed | ( |  | ) |

If debugging is allowed, given the limitations of the DebugByIP and DebugByUser settings.

Definition at line 1924 of file ezdebug.php.

## ◆ isDebugEnabled()

static eZDebug::isDebugEnabled | ( |  | ) |
| static

Returns
  true if debug should be enabled.

Note
  Will return false until the real settings has been updated with updateSettings()

Definition at line 1027 of file ezdebug.php.

Referenced by accumulatorStart(), accumulatorStop(), addTimingPoint(), createAccumulator(), createAccumulatorGroup(), eZExecution\defaultExceptionHandler(), errorHandler(), eZScript\shutdown(), write(), writeDebug(), writeError(), writeFile(), writeNotice(), writeStrict(), and writeWarning().

## ◆ isGlobalLogFileEnabled()

eZDebug::isGlobalLogFileEnabled | ( |  | ) |

Returns
  true if the message type $type has logging to file enabled.

See also
  isLogFileEnabled, setIsGlobalLogFileEnabled

Definition at line 974 of file ezdebug.php.

References $GlobalLogFileEnabled.

Referenced by isLogFileEnabled().

## ◆ isIPInNet()

static eZDebug::isIPInNet | ( |  | $ipaddress,
|  |  | $network,
|  |  | $mask = `24`
| ) |  |
| static

Determine if an ipaddress is in a network. E.G. 120.120.120.120 in 120.120.0.0/24.

Returns
  true or false.

Definition at line 1057 of file ezdebug.php.

Referenced by eZUser\isUserIPInList().

## ◆ isIPInNetIPv6()

static eZDebug::isIPInNetIPv6 | ( |  | $ipAddress,
|  |  | $ipAddressRange
| ) |  |
| static private

Determine if an IPv6 ipaddress is in a network. E.G. 2620:0:860:2:: in 2620:0:860:2::/64

Parameters

  string | $ipAddress | IP Address
  string | $ipAddressRange | IP Address Range

Returns
  bool Returns true if address is in the network and false if not in the network

Definition at line 1075 of file ezdebug.php.

## ◆ isLogFileEnabled()

eZDebug::isLogFileEnabled | ( |  | $type | ) |

Returns
  true if the message type $type has logging to file enabled.

See also
  isGlobalLogFileEnabled, setIsLogFileEnabled

Definition at line 963 of file ezdebug.php.

References isGlobalLogFileEnabled().

Referenced by write(), and writeFile().

## ◆ isLogOnlyEnabled()

static eZDebug::isLogOnlyEnabled | ( |  | ) |
| static

Returns
  true if there should only be logging of debug strings to file.

Note
  Will return false until the real settings has been updated with updateSettings()

Definition at line 1042 of file ezdebug.php.

Referenced by write().

## ◆ logFiles()

eZDebug::logFiles | ( |  | ) |

Returns an associative array of all the log files used by this class where each key is the debug level (self::LEVEL_NOTICE, self::LEVEL_WARNING or self::LEVEL_ERROR or self::LEVEL_DEBUG).

Definition at line 1017 of file ezdebug.php.

References $LogFiles.

Referenced by write().

## ◆ maxLogrotateFiles()

static eZDebug::maxLogrotateFiles | ( |  | ) |
| static

Returns
  the maxium number of logrotate files to keep.

Definition at line 812 of file ezdebug.php.

References MAX_LOGROTATE_FILES, and setLogrotateFiles().

Referenced by rotateLog().

## ◆ maxLogSize()

static eZDebug::maxLogSize | ( |  | ) |
| static

Returns
  the maxium size for a log file in bytes.

Definition at line 785 of file ezdebug.php.

References MAX_LOGFILE_SIZE, and setMaxLogSize().

Referenced by writeFile().

## ◆ messageName()

eZDebug::messageName | ( |  | $messageType | ) |

Returns
  the name of the message type.

Definition at line 191 of file ezdebug.php.

## ◆ messageTypes()

eZDebug::messageTypes | ( |  | ) |

Returns
  an array with the available message types.

Definition at line 1008 of file ezdebug.php.

References $MessageTypes.

## ◆ packedToBin()

static eZDebug::packedToBin | ( |  | $packedIPAddress | ) |
| static private

Turns the 'packed' output of inet_pton into a full binary representation

Parameters

  string | $packedIPAddress | Packed ip address in binary string form

Returns
  string Returns binary string representation

Definition at line 1093 of file ezdebug.php.

## ◆ printBottomReportsList()

static eZDebug::printBottomReportsList | ( |  | $as_html = `true` | ) |
| static

Loop over all bottom reports and if callable call them with $as_html parameter, if not output as is (string).

Parameters

  bool | $as_html |

Definition at line 1904 of file ezdebug.php.

References instance().

Referenced by printReportInternal().

## ◆ printReport()

static eZDebug::printReport | ( |  | $newWindow = `false`,
|  |  | $as_html = `true`,
|  |  | $returnReport = `false`,
|  |  | $allowedDebugLevels = `false`,
|  |  | $useAccumulators = `true`,
|  |  | $useTiming = `true`,
|  |  | $useIncludedFiles = `false`
| ) |  |
| static

Prints the debug report

Definition at line 1224 of file ezdebug.php.

References instance(), eZDir\path(), eZURI\transformURI(), and eZSys\varDirectory().

Referenced by eZFatalError(), eZDBInterface\reportError(), and eZScript\shutdown().

## ◆ printReportInternal()

eZDebug::printReportInternal | ( |  | $as_html = `true`,
|  |  | $returnReport = `true`,
|  |  | $allowedDebugLevels = `false`,
|  |  | $useAccumulators = `true`,
|  |  | $useTiming = `true`,
|  |  | $useIncludedFiles = `false`
| ) |  |
| private

Prints a full debug report with notice, warnings, errors and a timing report.

Definition at line 1424 of file ezdebug.php.

References $ScriptStart, $ScriptStop, $TimeAccumulatorGroupList, $TimeAccumulatorList, printBottomReportsList(), and printTopReportsList().

## ◆ printTopReportsList()

static eZDebug::printTopReportsList | ( |  | ) |
| static

Prints all 'top' reports

Definition at line 1879 of file ezdebug.php.

References instance().

Referenced by printReportInternal().

## ◆ recursionProtectErrorHandler()

eZDebug::recursionProtectErrorHandler | ( |  | $errno,
|  |  | $errstr,
|  |  | $errfile,
|  |  | $errline
| ) |  |

Definition at line 309 of file ezdebug.php.

References errorHandler().

## ◆ reset()

eZDebug::reset | ( |  | ) |

Definition at line 174 of file ezdebug.php.

## ◆ rotateLog()

static eZDebug::rotateLog | ( |  | $fileName | ) |
| static

Rotates logfiles so the current logfile is backed up, old rotate logfiles are rotated once more and those that exceed maxLogrotateFiles() will be removed. Rotated files will get the extension .1, .2 etc.

Definition at line 842 of file ezdebug.php.

References maxLogrotateFiles(), and eZFile\rename().

Referenced by writeFile().

## ◆ setHandleType()

static eZDebug::setHandleType | ( |  | $type | ) |
| static

Determines how PHP errors are handled. If $type is self::HANDLE_TO_PHP all error messages is sent to PHP using trigger_error(), if $type is self::HANDLE_FROM_PHP all error messages from PHP is fetched using a custom error handler and output as a usual eZDebug message. If $type is self::HANDLE_NONE there is no error exchange between PHP and eZDebug.

Definition at line 247 of file ezdebug.php.

References HANDLE_EXCEPTION, HANDLE_FROM_PHP, HANDLE_NONE, HANDLE_TO_PHP, and instance().

Referenced by eZPostgreSQLDB\__construct(), eZMySQLiDB\connect(), eZFatalError(), eZScript\initialize(), eZPostgreSQLDB\query(), eZDBInterface\reportError(), eZScript\startup(), updateSettings(), and writeFile().

## ◆ setIsGlobalLogFileEnabled()

eZDebug::setIsGlobalLogFileEnabled | ( |  | $enabled | ) |

Sets whether logfiles are enabled or disabled globally. Sets the value to $enabled.

See also
  isLogFileEnabled, isGlobalLogFileEnabled

Definition at line 992 of file ezdebug.php.

## ◆ setIsLogFileEnabled()

eZDebug::setIsLogFileEnabled | ( |  | $type,
|  |  | $enabled
| ) |  |

Sets whether the logfile $type is enabled or disabled to $enabled.

See also
  isLogFileEnabled

Definition at line 983 of file ezdebug.php.

## ◆ setLogFileEnabled()

static eZDebug::setLogFileEnabled | ( |  | $enabled,
|  |  | $types = `false`
| ) |  |
| static

Enables or disables logging to file for a given message type. If $types is not supplied it will do the operation for all types.

Definition at line 942 of file ezdebug.php.

References instance().

Referenced by writeFile().

## ◆ setLogOnly()

eZDebug::setLogOnly | ( |  | $enabled | ) |

Sets whether debug output should be logged only

Definition at line 1000 of file ezdebug.php.

## ◆ setLogrotateFiles()

static eZDebug::setLogrotateFiles | ( |  | $files | ) |
| static

Sets the maxium number of logrotate files to keep to $files.

Definition at line 830 of file ezdebug.php.

Referenced by maxLogrotateFiles().

## ◆ setMaxLogSize()

static eZDebug::setMaxLogSize | ( |  | $size | ) |
| static

Sets the maxium size for a log file to $size.

Definition at line 803 of file ezdebug.php.

Referenced by maxLogSize().

## ◆ setMessageOutput()

eZDebug::setMessageOutput | ( |  | $output | ) |

Determines the way messages are output, the $output parameter is self::OUTPUT_MESSAGE_SCREEN and self::OUTPUT_MESSAGE_STORE ored together.

Definition at line 663 of file ezdebug.php.

## ◆ setScriptStart()

static eZDebug::setScriptStart | ( |  | $time = `false` | ) |
| static

Sets the time of the start of the script ot $time. If $time is not supplied it gets the current `microtime( true )`. This is used to calculate total execution time and percentages.

Definition at line 1289 of file ezdebug.php.

References instance().

## ◆ setScriptStop()

static eZDebug::setScriptStop | ( |  | $time = `false` | ) |
| static

Sets the time of the stop of the script ot $time. If $time is not supplied it gets the current `microtime( true )`. This is used to calculate total execution time and percentages.

Definition at line 1302 of file ezdebug.php.

References instance().

## ◆ setStoreLog()

eZDebug::setStoreLog | ( |  | $store | ) |

Definition at line 668 of file ezdebug.php.

## ◆ setUseExternalCSS()

static eZDebug::setUseExternalCSS | ( |  | $use | ) |
| static

Enables/disables the use of external CSS. If false a <style> tag is output before the debug list. Default is to use internal css.

Definition at line 654 of file ezdebug.php.

References instance().

## ◆ showMessage()

static eZDebug::showMessage | ( |  | $type | ) |
| static

Returns true if the message type $type can be shown.

Definition at line 214 of file ezdebug.php.

References instance().

Referenced by addTimingPoint(), writeDebug(), writeError(), writeNotice(), writeStrict(), and writeWarning().

## ◆ showTypes()

static eZDebug::showTypes | ( |  | $types = `false` | ) |
| static

Sets types to be shown to $types and returns the old show types. If $types is not supplied the current value is returned and no change is done. $types is one or more of self::SHOW_NOTICE, self::SHOW_WARNING, self::SHOW_ERROR, self::SHOW_TIMING_POINT or'ed together.

Definition at line 296 of file ezdebug.php.

References instance().

## ◆ updateSettings()

static eZDebug::updateSettings | ( |  | $settings | ) |
| static

Updates the settings for debug handling with the settings array $settings. The array must contain the following keys.

- debug-enabled - boolean which controls debug handling
- debug-by-ip - boolean which controls IP controlled debugging
- debug-ip-list - array of IPs which gets debug
- debug-by-user - boolean which controls userID controlled debugging
- debug-user-list - array of UserIDs which gets debug

Definition at line 1132 of file ezdebug.php.

References setHandleType().

Referenced by eZScript\updateDebugSettings().

## ◆ write()

eZDebug::write | ( |  | $string,
|  |  | $verbosityLevel = `self::LEVEL_NOTICE`,
|  |  | $label = `""`,
|  |  | $backgroundClass = `""`,
|  |  | $alwaysLog = `false`
| ) |  |
| private

Writes a debug log message.

Definition at line 715 of file ezdebug.php.

References eZSys\clientIP(), isDebugEnabled(), isLogFileEnabled(), isLogOnlyEnabled(), LEVEL_DEBUG, LEVEL_ERROR, LEVEL_NOTICE, LEVEL_STRICT, LEVEL_TIMING_POINT, LEVEL_WARNING, logFiles(), eZSys\serverVariable(), and writeFile().

## ◆ writeDebug()

static eZDebug::writeDebug | ( |  | $string,
|  |  | $label = `""`,
|  |  | $backgroundClass = `""`
| ) |  |
| static

Writes a debug message.

The global variable `'eZDebugDebug'` will be set to `true` if the notice is added.

Parameters

  $label | This label will be associated with the notice, e.g. to say where the notice came from.

Definition at line 588 of file ezdebug.php.

References alwaysLogMessage(), dumpVariable(), instance(), isDebugEnabled(), and showMessage().

Referenced by eZDefaultVATHandler\chooseVatType(), eZContentClassPackageHandler\classDOMTree(), eZContentCacheManager\clearNodeViewCacheArray(), eZSQLite3DB\connect(), eZContentObjectTreeNodeOperations\copyPublishContentObject(), eZContentObjectTreeNodeOperations\copySubtree(), eZImageManager\createImageAlias(), eZImageAliasHandler\createImageInformationNode(), eZMySQLiDB\escapeString(), eZTemplate\fetch(), eZHTTPPersistence\fetchElement(), eZContentObjectPackageInstaller\finalize(), eZSearch\getEngine(), eZVATManager\getUserCountry(), eZSimplifiedXMLInput\inputXML(), eZDBPackageHandler\install(), eZPackage\install(), eZCodePageMapper\load(), eZXMLInputParser\process(), eZTemplateDebugFunction\process(), eZTemplate\processFunction(), eZXMLInputParser\processNewElements(), eZTemplate\processOperator(), eZXMLInputParser\processSubtree(), eZTemplate\processURI(), eZDBInterface\reportQuery(), eZTemplateTreeCache\restoreCache(), eZObjectRelationListType\serializeContentObjectAttribute(), eZTemplateTreeCache\setCachedTree(), eZImageGDHandler\setImageColorThresholdName(), eZImageGDHandler\setImageLuminanceNamed(), eZContentObjectAssignmentHandler\setupAssignments(), eZTemplateTreeCache\storeCache(), ezpI18n\translateText(), eZDBInterface\truncateString(), eZDebugSetting\writeDebug(), and eZContentCacheManager\writeDebugBits().

## ◆ writeError()

static eZDebug::writeError | ( |  | $string,
|  |  | $label = `""`,
|  |  | $backgroundClass = `""`
| ) |  |
| static

Writes a debug error.

The global variable `'eZDebugError'` will be set to `true` if the notice is added.

Parameters

  $label | This label will be associated with the notice, e.g. to say where the notice came from.

Examples
  /web/vh/ezpublish.se7enx.com/doc/api.exponential.earth/src/exponential/kernel/classes/ezurlaliasml.php.

Definition at line 545 of file ezdebug.php.

References alwaysLogMessage(), dumpVariable(), instance(), isDebugEnabled(), and showMessage().

Referenced by eZMBStringMapper\__construct(), eZTextCodec\__construct(), eZLocale\__construct(), eZPostgreSQLDB\__construct(), eZSQLite3DB\__construct(), eZContentClassAttribute\__construct(), eZDB\__construct(), eZModule\accessAllowed(), eZModule\actionParameter(), eZURLAliasML\actionToUrl(), eZExtension\activeExtensions(), eZContentObject\addContentObjectRelation(), eZContentLanguage\addLanguage(), eZCollaborationItemMessageLink\addMessage(), Cpdf\addPngFromFile(), eZImageInterface\allocateColor(), eZPolicyLimitation\allValuesAsArrayWithNames(), eZCodeTemplate\apply(), eZSection\applyTo(), eZSQLite3DB\arrayQuery(), eZEnum\attribute(), eZMatrixDefinition\attribute(), eZDataType\attribute(), eZWorkflowType\attribute(), eZNotificationEventHandler\attribute(), eZNotificationEventType\attribute(), eZWaitUntilDate\attribute(), eZHTTPFile\attribute(), eZModule\attribute(), eZSys\attribute(), eZURI\attribute(), eZWizardBase\attribute(), eZPersistentObject\attribute(), eZBinaryFileHandler\attribute(), eZCollaborationItemHandler\attribute(), eZContentObjectTranslation\attribute(), eZLocale\attribute(), eZContentBrowse\attribute(), eZContentUpload\attribute(), eZPackage\attribute(), eZAuthor\attribute(), eZKeyword\attribute(), eZMatrix\attribute(), eZMultiOption\attribute(), eZMultiOption2\attribute(), eZOption\attribute(), eZRangeOption\attribute(), eZXMLInputHandler\attribute(), eZXMLOutputHandler\attribute(), eZXMLText\attribute(), eZPackageCreationHandler\attribute(), eZPackageInstallationHandler\attribute(), eZDBInterface\attribute(), eZImageInterface\attribute(), eZDate\attribute(), eZDateTime\attribute(), eZTime\attribute(), eZTemplateSectionIterator\attribute(), eZSysInfo\attribute(), eZContentBrowse\browse(), eZContentObjectTreeNode\calendar(), eZPDFTable\callImage(), eZOrder\canModifyStatus(), eZImageHandler\changeFilePermissions(), eZContentObject\checkAccess(), eZContentObjectTreeNode\checkAccess(), eZContentObjectVersion\checkAccess(), eZDB\checkTransactionCounter(), eZDefaultVATHandler\chooseVatType(), eZWaitUntilDateValue\classAttributeName(), eZWaitUntilDateValue\className(), eZExecution\cleanup(), eZContentObject\cleanupAllInternalDrafts(), eZContentObject\cleanupInternalDrafts(), eZCache\clearItem(), eZFileHandler\close(), eZImageInterface\color(), eZDBInterface\commit(), eZPersistentObject\conditionTextByRow(), eZSQLite3DB\connect(), eZMySQLiDB\connect(), eZDataType\contentActionList(), eZImageGDHandler\convert(), eZImageShellHandler\convert(), eZImageManager\convert(), eZDir\copy(), eZFileHandler\copy(), eZContentObjectTreeNodeOperations\copyPublishContentObject(), eZContentObjectTreeNodeOperations\copySubtree(), eZNodeAssignment\create(), eZImageManager\createAliasFromINI(), eZContentFunctions\createAndPublishObject(), eZContentObjectTreeNode\createAttributeFilterSQLStrings(), eZWizardBaseClassLoader\createClass(), eZContentObjectTreeNode\createExtendedAttributeFilterSQLStrings(), eZImageTextLayer\createForText(), eZImageGDHandler\createFromINI(), eZImageShellHandler\createFromINI(), eZUser\createHash(), eZImageManager\createImageAlias(), eZObjectRelationListType\createNewObject(), eZContentObjectTreeNode\createSortingSQLStrings(), eZWorkflowType\createType(), eZINIAddonPackageHandler\currentID(), eZObjectRelationType\customClassAttributeHTTPAction(), eZObjectRelationListType\customClassAttributeHTTPAction(), eZEnumType\customClassAttributeHTTPAction(), eZMatrixType\customClassAttributeHTTPAction(), eZAuthorType\customObjectAttributeHTTPAction(), eZMatrixType\customObjectAttributeHTTPAction(), eZMultiOptionType\customObjectAttributeHTTPAction(), eZMultiOption2Type\customObjectAttributeHTTPAction(), eZMultiPriceType\customObjectAttributeHTTPAction(), eZObjectRelationType\customObjectAttributeHTTPAction(), eZObjectRelationListType\customObjectAttributeHTTPAction(), eZOptionType\customObjectAttributeHTTPAction(), eZWaitUntilDateType\customWorkflowEventHTTPAction(), eZPostgreSQLDB\databaseServerVersion(), eZCodeMapper\decodeCommand(), eZTemplateCacheBlock\decodeNodeID(), eZSOAPResponse\decodeStream(), eZFSFileHandler\delete(), eZGZIPZLIBCompressionHandler\doSeek(), eZFile\downloadContent(), eZFile\downloadHeaders(), eZSys\environmentVariable(), eZFileHandler\eof(), eZTemplate\error(), eZCodeMapper\error(), errorHandler(), eZModuleFunctionInfo\execute(), eZFunctionHandler\execute(), eZOperationHandler\execute(), eZModuleOperationInfo\execute(), eZFunctionHandler\executeAlias(), eZModuleOperationInfo\executeBody(), eZCodeMapper\executeCommandCode(), eZTemplateCompiler\executeCompilation(), eZCodeMapper\expandInheritance(), eZHTTPFile\fetch(), eZContentObject\fetch(), eZPendingActions\fetchByAction(), eZContentObject\fetchByNodeID(), eZContentObject\fetchForUpdate(), eZContentLanguage\fetchList(), eZUser\fetchLoggedInList(), eZBinaryFileType\fetchObjectAttributeHTTPInput(), eZMediaType\fetchObjectAttributeHTTPInput(), eZObjectRelationListType\fetchObjectAttributeHTTPInput(), eZContentObjectPackageHandler\fetchObjectFromFile(), eZURLAliasML\fetchPathByActionList(), eZWorkflowType\fetchRegisteredTypes(), eZPgsqlSchema\fetchTableIndexes(), eZTemplateExecuteOperator\fetchTransform(), eZContentObjectVersion\fetchVersionForUpdate(), eZFSFileHandler\fileDelete(), eZContentUpload\findHandler(), eZContentObjectTreeNode\findMainNode(), eZFileHandler\flush(), eZMutex\fp(), eZPgsqlSchema\generateAddIndexSql(), eZCodeMapper\generateCharsetMappingTable(), eZCodeMapper\generateCommandCode(), eZRSSExport\generateFeed(), eZContentObjectPackageHandler\generateFetchAliasArray(), eZStaticCache\generateNodeListCache(), eZURLAliasQuery\generateSQL(), eZExtension\getHandlerClass(), eZLDAPUser\getNodeAssignmentsForGroupName(), eZDefaultVATHandler\getProductCategory(), eZVATManager\getUserCountry(), eZVATManager\getUserCountryAttributeName(), eZLDAPUser\getUserGroupsTree(), eZLDAPUser\goAndPublishGroups(), eZCharTransform\groupCommands(), eZCollaborationItemHandler\handleCollaborationEvent(), eZTSTranslator\handleContextNode(), eZFilePassthroughHandler\handleFileDownload(), eZTSTranslator\handleMessageNode(), eZSubTreeHandler\handlePublishEvent(), eZUser\hasAccessToView(), eZPackage\import(), eZContentObjectEditHandler\initialize(), eZImageAliasHandler\initializeFromFile(), eZDBInterface\insertFile(), eZDBSchemaInterface\insertSchema(), eZDBPackageHandler\install(), eZPackage\installItem(), eZContentObjectPackageHandler\installOverrides(), eZContentObjectPackageHandler\installSuspendedNodeAssignment(), eZContentObjectPackageHandler\installSuspendedObjectRelations(), eZDB\instance(), eZUser\instance(), eZBinaryFileHandler\instance(), eZNotificationTransport\instance(), eZPostgreSQLDB\lastSerialID(), eZFileHandler\link(), eZCodePageMapper\load(), eZImageInterface\load(), eZDataType\loadAndRegisterType(), eZNotificationEventType\loadAndRegisterType(), eZWorkflowType\loadAndRegisterType(), eZShippingManager\loadBasketInfoHandler(), eZModuleFunctionInfo\loadDefinition(), eZModuleOperationInfo\loadDefinition(), eZNotificationEventFilter\loadHandler(), eZDBSchemaInterface\loadSchemaTransformationRules(), eZShippingManager\loadShippingHandler(), eZVATManager\loadVATHandler(), eZLDAPUser\loginUser(), eZSiteAccess\match(), eZPackage\md5sum(), eZTemplateImageOperator\modify(), eZKernelOperator\modify(), eZTopMenuOperator\modify(), eZWordToImageOperator\modify(), eZPDF\modify(), eZTemplateTextOperator\modify(), eZContentObjectTreeNodeOperations\move(), eZFileHandler\move(), eZContentObjectAssignmentHandler\nodeID(), eZIniSettingType\onPublish(), eZFileHandler\open(), eZCLI\parseOptionString(), eZFileHandler\passtrough(), eZUser\passwordHashTypeID(), eZContentObjectTreeNode\pathWithNames(), eZSOAPRequest\payload(), eZModuleFunctionInfo\preExecute(), eZGIFImageAnalyzer\process(), eZTemplateDoFunction\process(), eZTemplateIfFunction\process(), eZTemplateWhileFunction\process(), eZNotificationEventFilter\process(), eZFSFileHandler\processCache(), eZURLAliasFilter\processFilters(), eZTemplate\processNode(), eZTemplate\processURI(), eZLDAPUser\publishUpdateUser(), eZCache\purgeImageAliasForObject(), eZMySQLiDB\query(), eZPostgreSQLDB\query(), eZSQLite3DB\query(), eZFileHandler\read(), eZDir\recursiveDelete(), eZModule\redirect(), eZModule\redirectionURI(), eZModule\redirectTo(), eZPaymentGatewayType\registerGateway(), eZTranslatorGroup\registerHandler(), eZWorkflowType\registerType(), eZMySQLiDB\relationCount(), eZPostgreSQLDB\relationCount(), eZMySQLiDB\relationList(), eZPostgreSQLDB\relationList(), eZSQLite3DB\relationList(), eZContentClass\removableInformation(), eZImageAliasHandler\removeAliasFile(), eZContentClass\removeAttributes(), eZMySQLiDB\removeRelation(), eZPostgreSQLDB\removeRelation(), eZSQLite3DB\removeRelation(), eZObjectRelationListType\removeRelationObject(), eZContentClassAttribute\removeThis(), eZPathElement\removeThis(), eZUser\removeUser(), eZContentObjectVersion\removeVersions(), eZSiteInstaller\reportError(), eZDBInterface\reportError(), eZContentObject\restoreObjectAttributes(), eZContentBrowse\result(), eZUser\retrieveUserCacheFromFile(), eZURLAliasML\reverseTranslate(), eZFileHandler\rewind(), eZDBInterface\rollback(), eZPackageInstallationHandler\rootDOMNode(), eZModule\run(), eZWorkflowProcess\run(), eZModule\runHooks(), eZFileHandler\seek(), eZMailNotificationTransport\send(), eZMailTransport\send(), eZFileTransport\sendMail(), eZSendmailTransport\sendMail(), eZSMTPTransport\sendMail(), eZDateTimeType\serializeContentClassAttribute(), eZObjectRelationListType\serializeContentObjectAttribute(), eZDataType\serializeContentObjectAttribute(), eZSys\serverVariable(), eZPersistentObject\setAttribute(), eZURLAliasML\setLangMaskAlwaysAvailable(), eZCodePageMapper\setSubstituteCharacter(), eZVATManager\setUserCountry(), eZPreferences\setValue(), eZOrder\statusModificationList(), eZContentClassNameList\store(), eZPathElement\store(), eZWorkflowEvent\store(), eZImageInterface\store(), eZHTTPFile\store(), eZFSFileHandler\storeCache(), eZStaticCache\storeCache(), eZWorkflowEvent\storeDefined(), eZPackage\storeDOM(), eZImageAliasHandler\storeDOMTree(), eZURLAliasML\storePath(), eZPackage\storeString(), eZContentObjectTreeNode\subTreeByNodeID(), eZContentObjectTreeNode\subTreeGroupByDateField(), eZContentObjectTreeNode\subTreeMultiPaths(), eZFileHandler\symlink(), eZFileHandler\tell(), eZURLWildcard\translate(), eZURLWildcard\translateWithCache(), eZExecution\uncleanShutdownHandler(), eZContentObjectTreeNode\unhideSubTree(), eZPackage\uninstallItem(), eZFileHandler\unlink(), eZContentObjectTreeNode\unserialize(), eZDateTimeType\unserializeContentClassAttribute(), eZBinaryFileType\unserializeContentObjectAttribute(), eZEnumType\unserializeContentObjectAttribute(), eZDataType\unserializeContentObjectAttribute(), eZContentFunctions\updateAndPublishObject(), eZContentObjectTreeNode\updatePathIdentificationString(), eZContentObjectTreeNode\updateSubTreePath(), eZFileHandler\write(), eZLog\write(), eZDebugSetting\writeError(), writeFile(), and eZLog\writeStorageLog().

## ◆ writeFile()

eZDebug::writeFile | ( | & | $logFileData,
|  | & | $string,
|  |  | $verbosityLevel,
|  |  | $alwaysLog = `false`
| ) |  |
| private

Writes the log message $string to the file $fileName.

Definition at line 878 of file ezdebug.php.

References eZSys\clientIP(), isDebugEnabled(), isLogFileEnabled(), maxLogSize(), eZDir\mkdir(), rotateLog(), eZSys\serverVariable(), setHandleType(), setLogFileEnabled(), and writeError().

Referenced by write().

## ◆ writeNotice()

static eZDebug::writeNotice | ( |  | $string,
|  |  | $label = `""`,
|  |  | $backgroundClass = `""`
| ) |  |
| static

Writes a debug notice.

The global variable `'eZDebugNotice'` will be set to `true` if the notice is added.

Parameters

  $label | This label will be associated with the notice, e.g. to say where the notice came from.
  $backgroundClass | A string defining the class to use in the HTML debug output.

Definition at line 459 of file ezdebug.php.

References alwaysLogMessage(), dumpVariable(), instance(), isDebugEnabled(), and showMessage().

Referenced by eZLocale\countryFile(), eZContentObjectTreeNode\createAttributeFilterSQLStrings(), eZWizardBaseClassLoader\createClass(), eZPDF\createPDF(), eZContentUpload\detectLocations(), eZPackageHandler\errorChoosenAction(), errorHandler(), eZMediaType\fetchObjectAttributeHTTPInput(), eZExtension\getHandlerClass(), eZDefaultVATHandler\getProductCategory(), eZVATManager\getVAT(), eZTemplateFileResource\handleResourceData(), eZINIAddonPackageHandler\iniDOMTree(), eZXHTMLXMLOutput\initHandlerEmbed(), eZIniSettingType\initializeObjectAttribute(), eZContentClassPackageHandler\install(), eZLocale\languageFile(), eZLocale\localeFile(), eZLDAPUser\loginUser(), eZTreeMenuOperator\modify(), eZPDF\modify(), eZIniSettingType\onPublish(), eZTextInputParser\parseText(), eZLDAPUser\publishUpdateUser(), eZDBInterface\reportQuery(), eZTemplate\resourceFor(), eZObjectRelationType\serializeContentObjectAttribute(), eZWizardBase\setMetaData(), eZVATManager\setUserCountry(), eZMutex\steal(), eZContentObjectTreeNode\subTreeByNodeID(), eZContentClassPackageHandler\uninstall(), eZContentObjectPackageHandler\uninstall(), eZBinaryFileType\unserializeContentObjectAttribute(), eZMediaType\unserializeContentObjectAttribute(), eZFloatType\validateClassAttributeHTTPInput(), eZIniSettingType\validateClassAttributeHTTPInput(), eZIntegerType\validateClassAttributeHTTPInput(), eZContentObject\versionLanguageName(), and eZDebugSetting\writeNotice().

## ◆ writeStrict()

static eZDebug::writeStrict | ( |  | $string,
|  |  | $label = `""`,
|  |  | $backgroundClass = `""`
| ) |  |
| static

Writes a strict debug message.

The global variable `'eZDebugStrict'` will be set to `true` if the notice is added.

Parameters

  $label | This label will be associated with the strict message, e.g. to say where the message came from.
  $backgroundClass | A string defining the class to use in the HTML debug output.

Definition at line 414 of file ezdebug.php.

References alwaysLogMessage(), dumpVariable(), instance(), isDebugEnabled(), and showMessage().

Referenced by eZExtension\activateExtensions(), eZContentObjectTreeNode\createVersionNameJoinsSQLString(), eZContentObjectTreeNode\createVersionNameTablesSQLString(), eZContentObjectTreeNode\createVersionNameTargetsSQLString(), errorHandler(), ezi18n(), ezx18n(), eZGeneralDigestUserSettings\fetchForUser(), eZTemplate\hasVariable(), eZUser\isLoggedIn(), eZGeneralDigestUserSettings\removeByAddress(), templateInit(), and eZTemplate\variable().

## ◆ writeWarning()

static eZDebug::writeWarning | ( |  | $string,
|  |  | $label = `""`,
|  |  | $backgroundClass = `""`
| ) |  |
| static

Writes a debug warning.

The global variable `'eZDebugWarning'` will be set to `true` if the notice is added.

Parameters

  $label | This label will be associated with the notice, e.g. to say where the notice came from.

Examples
  /web/vh/ezpublish.se7enx.com/doc/api.exponential.earth/src/exponential/kernel/classes/ezurlaliasml.php.

Definition at line 502 of file ezdebug.php.

References alwaysLogMessage(), dumpVariable(), instance(), isDebugEnabled(), and showMessage().

Referenced by eZImageAliasHandler\__construct(), eZMySQLiDB\__construct(), eZPostgreSQLDB\__construct(), eZXMLInputHandler\__construct(), eZFSFileHandler\_exclusiveLock(), accumulatorStop(), eZModule\activeModuleRepositories(), eZContentObject\addContentObjectRelation(), eZContentLanguage\addLanguage(), eZImageObject\appendLayer(), eZXMLInputHandler\attribute(), eZImageInterface\attribute(), eZTemplate\autoload(), eZXMLInputParser\callInputHandler(), eZXMLInputParser\callOutputHandler(), eZSimplifiedXMLEditOutput\callOutputHandler(), eZXMLOutputHandler\callTagRenderHandler(), eZMySQLiDB\checkCharsetPriv(), eZURLAliasML\choosePrioritizedRow(), eZSiteInstaller\classByIdentifier(), eZClusterFileHandler\cleanupGeneratingFiles(), eZMySQLiDB\connect(), eZImageGDHandler\convert(), eZImageShellHandler\convert(), eZImageManager\convert(), eZImageAnalyzer\create(), eZImageInterface\createImage(), eZImageManager\createImageAlias(), eZContentObjectTreeNode\createSortingSQLStrings(), eZModule\currentAction(), eZTemplateDesignResource\designSetting(), eZImageInterface\drawText(), errorHandler(), eZFunctionHandler\executeAlias(), eZContentObjectTreeNode\fetch(), eZContentObjectTreeNode\fetchByCRC(), eZContentObjectTreeNode\fetchByURLPath(), eZInformationCollection\fetchCollectionsList(), eZCache\fetchList(), eZCollaborationItem\fetchListTool(), eZExtension\findExtensionType(), eZModule\findModule(), eZObjectRelationListType\fixRelatedObjectItem(), eZImageObject\flatten(), eZObjectRelationListType\fromString(), eZLDAPUser\getGroupNameByDN(), eZInformationCollection\getSortArrayFromParam(), eZHTTPTool\getVariable(), eZVATManager\getVAT(), eZLDAPUser\goAndPublishGroups(), eZModule\handleError(), eZSerializedObjectNameList\hasNameInLocale(), eZXHTMLXMLOutput\initHandlerEmbed(), eZXHTMLXMLOutput\initHandlerLink(), eZSiteInstaller\initSettings(), eZSiteInstaller\initSteps(), eZDataType\insertHTTPFile(), eZDataType\insertRegularFile(), eZDataType\insertSimpleString(), eZContentClassPackageHandler\install(), eZUser\instance(), eZSiteInstaller\instance(), eZUserLoginHandler\instance(), eZCollaborationItemHandler\instantiate(), eZPackage\languageInfoFromPackageList(), eZLintSchema\lintCheckSchema(), eZCodePage\load(), eZCodePageMapper\load(), eZDataType\loadAndRegisterType(), eZDBSchemaInterface\loadSchemaTransformationRules(), eZTSTranslator\loadTranslationFile(), eZLDAPUser\loginUser(), eZBinaryFile\metaData(), eZXMLOutputHandler\outputTag(), eZSiteInstaller\packageFileItemPath(), eZObjectRelationListType\postUnserializeContentObjectAttribute(), eZHTTPTool\postVariable(), eZImageObject\prependLayer(), eZContentLanguage\prioritizedLanguages(), eZImageInterface\processImage(), eZDataType\productOptionInformation(), eZLDAPUser\publishNewUserGroup(), eZLDAPUser\publishUpdateUser(), eZImageAnalyzer\readAnalyzerSettingsFromINI(), eZImageManager\readImageAliasesFromINI(), eZImageManager\readImageHandlersFromINI(), eZContentObject\relatedObjects(), eZSiteInstaller\removeContentObject(), eZFile\rename(), eZSubtreeCache\renameDir(), eZTranslationCache\restoreCache(), eZWorkflowProcess\run(), eZProcess\runFile(), eZModule\runHooks(), eZSiteAccess\saNameByLanguage(), eZSendmailTransport\sendMail(), eZContentObjectVersion\serialize(), eZXMLInputParser\setAttributes(), eZTranslationCache\setContextCache(), eZSerializedObjectNameList\setDefaultLanguageByLocale(), eZTemplateDesignResource\setDesignSetting(), eZSerializedObjectNameList\setNameByLanguageLocale(), eZMultiPrice\setPriceByCurrency(), eZSiteInstaller\setting(), eZSiteInstaller\solutionName(), eZSiteInstaller\solutionVersion(), eZContentObjectTreeNode\sortFieldID(), eZContentObjectTreeNode\sortFieldName(), eZTranslationCache\storeCache(), eZSOAPResponse\stripHTTPHeader(), eZCollaborationGroup\subTree(), eZTemplateCacheBlock\subtreeCacheSubDirForNode(), eZContentObjectTreeNode\subTreeMultiPaths(), eZXMLTextType\transformRemoteLinksToLinks(), eZDBSchemaInterface\transformSchema(), eZContentObjectVersion\unpublish(), eZContentObjectTreeNode\updateNodeVisibility(), eZHTTPTool\variable(), eZContentClass\versionHistoryLimit(), eZTemplate\warning(), eZCodeMapper\warning(), and eZDebugSetting\writeWarning().

## Member Data Documentation

## ◆ $AlwaysLog

eZDebug::$AlwaysLog

Definition at line 2074 of file ezdebug.php.

## ◆ $bottomReportsList

eZDebug::$bottomReportsList

A list of debug reports that appears at the bottom of debug output.

Definition at line 2065 of file ezdebug.php.

## ◆ $DebugStrings

eZDebug::$DebugStrings = array()

String array containing the debug information

Definition at line 2010 of file ezdebug.php.

## ◆ $GlobalLogFileEnabled

eZDebug::$GlobalLogFileEnabled

Controls whether logfiles are used at all.

Definition at line 2052 of file ezdebug.php.

Referenced by isGlobalLogFileEnabled().

## ◆ $HandleType

eZDebug::$HandleType

Determines what to do with php errors, ignore, fetch or output.

Definition at line 2025 of file ezdebug.php.

## ◆ $LogFileEnabled

eZDebug::$LogFileEnabled

A map with message types and whether they should do file logging.

Definition at line 2049 of file ezdebug.php.

## ◆ $LogFiles

eZDebug::$LogFiles

An array of logfiles used by the debug class with each key being the debug level.

Definition at line 2031 of file ezdebug.php.

Referenced by logFiles().

## ◆ $MessageNames

eZDebug::$MessageNames

Definition at line 2072 of file ezdebug.php.

## ◆ $MessageOutput

eZDebug::$MessageOutput

Determines how messages are output (screen/log)

Definition at line 2043 of file ezdebug.php.

## ◆ $MessageTypes

eZDebug::$MessageTypes

A list of message types.

Definition at line 2046 of file ezdebug.php.

Referenced by messageTypes().

## ◆ $OldHandler

eZDebug::$OldHandler

Definition at line 2076 of file ezdebug.php.

## ◆ $OutputFormat

eZDebug::$OutputFormat

An array of the outputformats for the different debug levels.

Definition at line 2028 of file ezdebug.php.

## ◆ $OverrideList

eZDebug::$OverrideList

A list of override directories.

Definition at line 2062 of file ezdebug.php.

## ◆ $PercentAccuracy

eZDebug::$PercentAccuracy = 4

How many places behind . should be displayed when showing percentages.

Definition at line 2037 of file ezdebug.php.

## ◆ $recursionFlag

eZDebug::$recursionFlag = false
| private

Definition at line 2070 of file ezdebug.php.

## ◆ $ScriptStart

eZDebug::$ScriptStart

The time when the script was started.

Definition at line 2055 of file ezdebug.php.

Referenced by printReportInternal().

## ◆ $ScriptStop

eZDebug::$ScriptStop

The time when the script was stopped (of course this is an approximation, since the script must stop after printing debug info)

Definition at line 2059 of file ezdebug.php.

Referenced by printReportInternal().

## ◆ $ShowTypes

eZDebug::$ShowTypes

Determines which debug messages should be shown.

Definition at line 2022 of file ezdebug.php.

## ◆ $StoreLog

eZDebug::$StoreLog

Definition at line 58 of file ezdebug.php.

## ◆ $TimeAccumulatorGroupList

eZDebug::$TimeAccumulatorGroupList

Definition at line 2078 of file ezdebug.php.

Referenced by printReportInternal().

## ◆ $TimeAccumulatorList

eZDebug::$TimeAccumulatorList = array()

Array wich contains time accumulators.

Definition at line 2019 of file ezdebug.php.

Referenced by printReportInternal().

## ◆ $TimePoints

eZDebug::$TimePoints = array()

Array which contains the time points.

Definition at line 2013 of file ezdebug.php.

## ◆ $TimingAccuracy

eZDebug::$TimingAccuracy = 4

How many places behind . should be displayed when showing times.

Definition at line 2034 of file ezdebug.php.

## ◆ $TmpTimePoints

eZDebug::$TmpTimePoints

Array which contains the temporary time points.

Definition at line 2016 of file ezdebug.php.

## ◆ $topReportsList

eZDebug::$topReportsList

A list of debug reports that appears at the top of debug output.

Definition at line 2068 of file ezdebug.php.

## ◆ $UseCSS

eZDebug::$UseCSS

Whether to use external CSS or output own CSS. True if external is to be used.

Definition at line 2040 of file ezdebug.php.

## ◆ HANDLE_EXCEPTION

const eZDebug::HANDLE_EXCEPTION = 3

Definition at line 77 of file ezdebug.php.

Referenced by eZPostgreSQLDB\__construct(), eZMySQLiDB\connect(), eZPostgreSQLDB\query(), and setHandleType().

## ◆ HANDLE_FROM_PHP

const eZDebug::HANDLE_FROM_PHP = 1

Definition at line 75 of file ezdebug.php.

Referenced by eZScript\initialize(), and setHandleType().

## ◆ HANDLE_NONE

const eZDebug::HANDLE_NONE = 0

Definition at line 74 of file ezdebug.php.

Referenced by __construct(), eZFatalError(), eZDBInterface\reportError(), and setHandleType().

## ◆ HANDLE_TO_PHP

const eZDebug::HANDLE_TO_PHP = 2

Definition at line 76 of file ezdebug.php.

Referenced by setHandleType(), and eZScript\startup().

## ◆ LEVEL_DEBUG

const eZDebug::LEVEL_DEBUG = 5

Definition at line 63 of file ezdebug.php.

Referenced by eZScript\getOptions(), eZSimplifiedXMLInput\inputXML(), eZXMLInputParser\process(), eZXMLInputParser\processNewElements(), eZXMLInputParser\processSubtree(), eZScript\updateDebugSettings(), write(), and eZDebugSetting\writeDebug().

## ◆ LEVEL_ERROR

const eZDebug::LEVEL_ERROR = 3

Definition at line 61 of file ezdebug.php.

Referenced by eZScript\getOptions(), eZScript\updateDebugSettings(), write(), and eZDebugSetting\writeError().

## ◆ LEVEL_NOTICE

const eZDebug::LEVEL_NOTICE = 1

Definition at line 59 of file ezdebug.php.

Referenced by eZScript\getOptions(), eZScript\updateDebugSettings(), write(), and eZDebugSetting\writeNotice().

## ◆ LEVEL_STRICT

const eZDebug::LEVEL_STRICT = 6

Definition at line 64 of file ezdebug.php.

Referenced by eZScript\getOptions(), eZScript\updateDebugSettings(), and write().

## ◆ LEVEL_TIMING_POINT

const eZDebug::LEVEL_TIMING_POINT = 4

Definition at line 62 of file ezdebug.php.

Referenced by eZDebugSetting\addTimingPoint(), eZScript\getOptions(), and write().

## ◆ LEVEL_WARNING

const eZDebug::LEVEL_WARNING = 2

Definition at line 60 of file ezdebug.php.

Referenced by eZScript\getOptions(), eZScript\updateDebugSettings(), write(), and eZDebugSetting\writeWarning().

## ◆ MAX_LOGFILE_SIZE

const eZDebug::MAX_LOGFILE_SIZE = 204800

Definition at line 82 of file ezdebug.php.

Referenced by maxLogSize().

## ◆ MAX_LOGROTATE_FILES

const eZDebug::MAX_LOGROTATE_FILES = 3

Definition at line 83 of file ezdebug.php.

Referenced by maxLogrotateFiles().

## ◆ OUTPUT_MESSAGE_SCREEN

const eZDebug::OUTPUT_MESSAGE_SCREEN = 1

Definition at line 79 of file ezdebug.php.

## ◆ OUTPUT_MESSAGE_STORE

const eZDebug::OUTPUT_MESSAGE_STORE = 2

Definition at line 80 of file ezdebug.php.

Referenced by __construct().

## ◆ SHOW_ALL

const eZDebug::SHOW_ALL = 63

Definition at line 72 of file ezdebug.php.

Referenced by __construct().

## ◆ SHOW_DEBUG

const eZDebug::SHOW_DEBUG = 16

Definition at line 70 of file ezdebug.php.

## ◆ SHOW_ERROR

const eZDebug::SHOW_ERROR = 4

Definition at line 68 of file ezdebug.php.

## ◆ SHOW_NOTICE

const eZDebug::SHOW_NOTICE = 1

Definition at line 66 of file ezdebug.php.

## ◆ SHOW_STRICT

const eZDebug::SHOW_STRICT = 32

Definition at line 71 of file ezdebug.php.

## ◆ SHOW_TIMING_POINT

const eZDebug::SHOW_TIMING_POINT = 8

Definition at line 69 of file ezdebug.php.

## ◆ SHOW_WARNING

const eZDebug::SHOW_WARNING = 2

Definition at line 67 of file ezdebug.php.

## ◆ XDEBUG_SIGNATURE

const eZDebug::XDEBUG_SIGNATURE = '--XDEBUG--'

Definition at line 85 of file ezdebug.php.

Referenced by dumpVariable().

The documentation for this class was generated from the following file:

- ezdebug.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.