PHP Class Log, zys

Inheritance: extends ToolsAppModel
Mostra file Open project: qieangel2013/zys Class Usage Examples

Public Properties

Property Type Description
$contents
$format 日期格式
$log 日志信息

Public Methods

Method Description
append ( string $filename, string $content, $type = '' ) : boolean 文件追加写入
get ( string $filename, string $name, $type = '' ) : boolean 读取文件信息
has ( string $filename, $type = '' ) : boolean 文件是否存在
load ( $_filename, array $vars = null ) : void 加载文件
put ( string $filename, string $content, $type = '' ) : boolean 文件写入
read ( $filename, $type = '' )
record ( string $message, string $level = self::ERR, boolean $record = false ) : void 记录日志 并且会过滤未经设置的级别
trance ( $message, string $destination = '', $level = 'ERR', integer $type = 3, string $extra = '' ) : void 日志保存
unlink ( string $filename, $type = '' ) : boolean 文件删除
write ( string $message, string $level = self::ERR, string $destination = '', integer $type = 3, string $extra = '' ) : void 日志直接写入

Method Details

append() static public method

文件追加写入
static public append ( string $filename, string $content, $type = '' ) : boolean
$filename string 文件名
$content string 追加的文件内容
return boolean

get() static public method

读取文件信息
static public get ( string $filename, string $name, $type = '' ) : boolean
$filename string 文件名
$name string 信息名 mtime或者content
return boolean

has() static public method

文件是否存在
static public has ( string $filename, $type = '' ) : boolean
$filename string 文件名
return boolean

load() static public method

加载文件
static public load ( $_filename, array $vars = null ) : void
$vars array 传入变量
return void

put() static public method

文件写入
static public put ( string $filename, string $content, $type = '' ) : boolean
$filename string 文件名
$content string 文件内容
return boolean

read() static public method

static public read ( $filename, $type = '' )

record() static public method

记录日志 并且会过滤未经设置的级别
static public record ( string $message, string $level = self::ERR, boolean $record = false ) : void
$message string 日志信息
$level string 日志级别
$record boolean 是否强制记录
return void

trance() static public method

日志保存
static public trance ( $message, string $destination = '', $level = 'ERR', integer $type = 3, string $extra = '' ) : void
$destination string 写入目标
$type integer 日志记录方式
$extra string 额外参数
return void

write() static public method

日志直接写入
static public write ( string $message, string $level = self::ERR, string $destination = '', integer $type = 3, string $extra = '' ) : void
$message string 日志信息
$level string 日志级别
$destination string 写入目标
$type integer 日志记录方式
$extra string 额外参数
return void

Property Details

$contents public_oe static_oe property

public static $contents

$format static_oe public_oe property

日期格式
static public $format

$log static_oe public_oe property

日志信息
static public $log