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.
저자: =undo= ([email protected])
파일 보기 프로젝트 열기: wpxtreme/wpdk

공개 프로퍼티들

프로퍼티 타입 설명
$available boolean Get TRUE if log is available. Could be FALSE if file is not writeable
$enabled boolean Get/Set Enabled log. Default TRUE
$extensionFilename string Return the Log filename extension. Default 'php'
$logname string Get the generate log filename: YYYY-MM-DD.php
$path string Get the complete path of log
$prefix string Return prefix to add date filename. Eg wpxss-20120912.php. Default empty.
$separator string Get/Set the line separator gap in log events
$triggerError boolean Get/Set Enabled trigger error. Default FALSE

공개 메소드들

메소드 설명
__construct ( string $path, string $folder = 'logs', string $extension = 'php' ) : WPDKWatchDog Create an instance of WPDKWatchDog class
log ( mixed $txt, mixed $args = null ) : boolean Write a content in log.

메소드 상세

__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

log() 공개 메소드

Write a content in log.
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

$path 공개적으로 프로퍼티

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