获取当前 Asf_Log_Adapter_File 实例, 如果未有, 则实例化
日志路径: asf.log_path
public function getFileLogger(string $file_name)
日志文件名称
Asf_Logger Object 代表返回成功, false 代表失败
<?php define('MODULE_PATH', '/var/www/'); class IndexService extends Asf_AbstractService { public function indexAction() { $logger = $this->getFileLogger('biz-dd_log'); $logger->info('xxxxx'); $logger->close(); } } $configs = array( 'asf' => array( 'root_path' => MODULE_PATH, 'log_path' => LOG_PATH, ) ); $handle = new Asf_Application($configs); $handle->run();