PHP Класс WPDKWatchDog
## Overview
The WPDKWatchDog class manage a standard log system to trace your own data. A log file is formatted with the time of
the day. So, every day you found a log file. All log file are put into the default folder 'logs', on main path of
instance class.
## Getting started
You rarely need to instantiate this class. The WPDKWordPressPlugin class create a WPDKWatchDog's instance for us and
then set WPDKWatchDog pointer in
log property of WPDKWordPressPlugin subclasses.
Показать файл
Открыть проект
Открытые свойства
Открытые методы
Описание методов
__construct()
публичный Метод
Create an instance of WPDKWatchDog class
public __construct ( string $path, string $folder = 'logs', string $extension = 'php' ) : WPDKWatchDog |
$path |
string |
Path of main file |
$folder |
string |
Name of log folder, default 'logs' |
$extension |
string |
This is the extension of single log filename, default 'php' |
Результат |
WPDKWatchDog |
|
public log ( mixed $txt, mixed $args = null ) : boolean |
$txt |
mixed |
Content to log. Usually this is a string or number. However you can set this param direcly to
object or array. In this case the log method recognize the not string param and do
a `var_dump`. |
$args |
mixed |
Optional. ... |
Результат |
boolean |
|
Описание свойств
$available публичное свойство
Get TRUE if log is available. Could be FALSE if file is not writeable
public bool $available |
Результат |
boolean |
|
$enabled публичное свойство
Get/Set Enabled log. Default TRUE
public bool $enabled |
Результат |
boolean |
|
$extensionFilename публичное свойство
Return the Log filename extension. Default 'php'
public string $extensionFilename |
Результат |
string |
|
$logname публичное свойство
Get the generate log filename: YYYY-MM-DD.php
public string $logname |
Результат |
string |
|
Get the complete path of log
public string $path |
Результат |
string |
|
$prefix публичное свойство
Return prefix to add date filename. Eg wpxss-20120912.php. Default empty.
public string $prefix |
Результат |
string |
|
$separator публичное свойство
Get/Set the line separator gap in log events
public string $separator |
Результат |
string |
|
$triggerError публичное свойство
Get/Set Enabled trigger error. Default FALSE
public bool $triggerError |
Результат |
boolean |
|