PHP Class Swoole\Log\FileLog

Author: Tianfeng.Han
Inheritance: extends Swoole\Log, implements Swoole\IFace\Log
Afficher le fichier Open project: matyhtf/swoole_framework

Protected Properties

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

Méthodes publiques

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

Private Methods

Méthode Description
openFile ( $file )

Method Details

__construct() public méthode

public __construct ( $config )

__destruct() public méthode

public __destruct ( )

flush() public méthode

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

format() public méthode

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

put() public méthode

写入日志队列
public put ( $msg, $level = self::INFO ) : boolean
$msg string 信息
$level int 事件类型
Résultat 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