Asf_Log_LoggerInterface

Introduction

Asf_Log_LoggerInterface 日志接口类

在开启命名空间情况下(asf.use_namespace=1)类名为 Asf\Log\LoggerInterface

Class synopsis

<?php
interface Asf_Log_LoggerInterface
{
    public bool emergency(string $message, array $content = array())
    public bool alert(string $message, array $content = array())
    public bool critical(string $message, array $content = array())
    public bool error(string $message, array $content = array())
    public bool warning(string $message, array $content = array())
    public bool notice(string $message, array $content = array())
    public bool info(string $message, array $content = array())
    public bool debug(string $message, array $content = array())
    public bool log(string $level, string $message, array $content = array())
}

Asf_Log_AbstractLogger

Introduction

Asf_Log_AbstractLogger 日志类

在开启命名空间情况下(asf.use_namespace=1)类名为 Asf\Log\AbstractLogger

Class synopsis

(节约页面空间, 省略相同的方法)

<?php
abstract class Asf_Log_AbstractLogger implements Asf_Log_LoggerInterface
{
    public boolean doLog(string $message)
}

Asf_Log_Adapter_File

Introduction

Asf_Log_Adapter_File 文件日志类

Asf框架会自动关闭所有已打开的文件句柄

在开启命名空间情况下(asf.use_namespace=1)类名为 Asf\Log\Adapter\File

Class synopsis

<?php
final class Asf_Log_Adapter_File extends Asf_Log_AbstractLogger
{
    public Asf_Log_Adapter_File __construct(string $file_name, string $file_path = '')
    public bool doLog(string $message)
    public bool close()
}

Asf_Log_Adapter_Syslog

Introduction

Asf_Log_Adapter_Syslog 系统日志类

Asf框架会自动关闭所有已打开的文件句柄

Linux日志位置: /var/log/messages

在开启命名空间情况下(asf.use_namespace=1)类名为 Asf\Log\Adapter\Syslog

Class synopsis

<?php
final class Asf_Log_Adapter_Syslog extends Asf_Log_AbstractLogger
{
    public Asf_Log_Adapter_Syslog __construct(string $ident, int $options = LOG_PID, int $facility = LOG_LOCAL0)
    public bool doLog(string $message)
    public boolean close()
}