public bool Asf_Application::setLogErrFileName(string $filename)
自定义错误日志的文件名, 关联配置项 asf.dispathcer.log.err = 1
设置成功返回 true, 设置失败返回 false
异常日志按月进行划分
<?php
// asf.use_namespace => On
$handle = new Asf\Application($configs);
$handle->setLogErrFileName('Asf.Err.Log.' . date('Y-m'));
$handle->run();
异常日志按天进行划分
<?php
// asf.use_namespace => On
class Bootstrap
{
public function _initLog()
{
Asf\Application::getInstance()->setLogErrFileName('PHP_Error_' . date('Y-m-d'));
}
}
$handle = new Asf\Application($configs);
$handle->bootstrap()->run();