Asf_Log_Formatter_File 文件日志格式化类
在开启命名空间情况下(asf.use_namespace=1)类名为 Asf\Log\Formatter\File
<?php final class Asf_Log_Formatter_File implements Asf_Log_FormatterInterface { protected $_format = '{date} [{type}] {message}'; protected $_date_format = 'd-M-Y H:i:s e'; public function format(string $level, int $time, string $message) }
<?php define('LOG_PATH', '/data/logs/'); $logger = new Asf_Log_Adapter_File('biz-dd_log', LOG_PATH); var_dump($logger->info('xxxxx'));