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.
파일 보기
프로젝트 열기: wpxtreme/wpdk
공개 프로퍼티들
공개 메소드들
메소드 상세
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 |
|
프로퍼티 상세
Get TRUE if log is available. Could be FALSE if file is not writeable
Get/Set Enabled log. Default TRUE
$extensionFilename 공개적으로 프로퍼티
Return the Log filename extension. Default 'php'
public string $extensionFilename |
리턴 |
string |
|
Get the generate log filename: YYYY-MM-DD.php
public string $logname |
리턴 |
string |
|
Get the complete path of log
Return prefix to add date filename. Eg wpxss-20120912.php. Default empty.
public string $prefix |
리턴 |
string |
|
Get/Set the line separator gap in log events
public string $separator |
리턴 |
string |
|
Get/Set Enabled trigger error. Default FALSE
public bool $triggerError |
리턴 |
boolean |
|