PHP 클래스 think\Log

파일 보기 프로젝트 열기: top-think/framework 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$config 配置参数
$driver 日志写入驱动
$key 当前日志授权key
$log 日志信息
$type 日志类型

공개 메소드들

메소드 설명
__callStatic ( $method, $args ) : mixed 静态调用
check ( array $config ) : boolean 检查日志写入权限
clear ( ) : void 清空日志信息
getLog ( string $type = '' ) : array 获取日志信息
init ( array $config = [] ) 日志初始化
key ( string $key ) : void 当前日志记录的授权key
record ( mixed $msg, string $type = 'log' ) : void 记录调试信息
save ( ) : boolean 保存调试信息
write ( mixed $msg, string $type = 'log', boolean $force = false ) : boolean 实时写入日志信息 并支持行为

메소드 상세

__callStatic() 공개 정적인 메소드

静态调用
public static __callStatic ( $method, $args ) : mixed
$method
$args
리턴 mixed

check() 공개 정적인 메소드

检查日志写入权限
public static check ( array $config ) : boolean
$config array 当前日志配置参数
리턴 boolean

clear() 공개 정적인 메소드

清空日志信息
public static clear ( ) : void
리턴 void

getLog() 공개 정적인 메소드

获取日志信息
public static getLog ( string $type = '' ) : array
$type string 信息类型
리턴 array

init() 공개 정적인 메소드

日志初始化
public static init ( array $config = [] )
$config array

key() 공개 정적인 메소드

当前日志记录的授权key
public static key ( string $key ) : void
$key string 授权key
리턴 void

record() 공개 정적인 메소드

记录调试信息
public static record ( mixed $msg, string $type = 'log' ) : void
$msg mixed 调试信息
$type string 信息类型
리턴 void

save() 공개 정적인 메소드

保存调试信息
public static save ( ) : boolean
리턴 boolean

write() 공개 정적인 메소드

实时写入日志信息 并支持行为
public static write ( mixed $msg, string $type = 'log', boolean $force = false ) : boolean
$msg mixed 调试信息
$type string 信息类型
$force boolean 是否强制写入
리턴 boolean

프로퍼티 상세

$config 보호되어 있는 정적으로 프로퍼티

配置参数
protected static $config

$driver 보호되어 있는 정적으로 프로퍼티

日志写入驱动
protected static $driver

$key 보호되어 있는 정적으로 프로퍼티

当前日志授权key
protected static $key

$log 보호되어 있는 정적으로 프로퍼티

日志信息
protected static $log

$type 보호되어 있는 정적으로 프로퍼티

日志类型
protected static $type