PHP Class Swoole\Log\FileLog

Author: Tianfeng.Han
Inheritance: extends Swoole\Log, implements Swoole\IFace\Log
Mostra file Open project: matyhtf/swoole_framework

Protected Properties

Property Type Description
$archive 是否按日期存储日志
$cut_file 是否切割文件
$date
$enable_cache
$fp
$log_dir
$log_file
$queue 待写入文件的日志队列(缓冲区)
$verbose 是否记录更详细的信息(目前记多了文件名、行号)

Public Methods

Method Description
__construct ( $config )
__destruct ( )
flush ( ) 将日志队列(缓冲区)的日志写入文件
format ( $msg, $level, &$date = null )
put ( $msg, $level = self::INFO ) : boolean 写入日志队列

Private Methods

Method Description
openFile ( $file )

Method Details

__construct() public method

public __construct ( $config )

__destruct() public method

public __destruct ( )

flush() public method

将日志队列(缓冲区)的日志写入文件
public flush ( )

format() public method

public format ( $msg, $level, &$date = null )

put() public method

写入日志队列
public put ( $msg, $level = self::INFO ) : boolean
$msg string 信息
$level int 事件类型
return boolean

Property Details

$archive protected_oe property

是否按日期存储日志
protected $archive

$cut_file protected_oe property

是否切割文件
protected $cut_file

$date protected_oe property

protected $date

$enable_cache protected_oe property

protected $enable_cache

$fp protected_oe property

protected $fp

$log_dir protected_oe property

protected $log_dir

$log_file protected_oe property

protected $log_file

$queue protected_oe property

待写入文件的日志队列(缓冲区)
protected $queue

$verbose protected_oe property

是否记录更详细的信息(目前记多了文件名、行号)
protected $verbose