yaf.use_spl_autoload 设置为 On
public function _initLibrary(){
Yaf_Loader::import('function.php');
Yaf_Loader::import('log4php/Logger.php');
\Logger::configure(ROOTDIRECTORY_PATH.'/conf/log4php.properties');
}
log4php.properties设置
log4php.rootLogger=DEBUG,mdshlog4php.appender.mdsh=LoggerAppenderDailyFilelog4php.appender.mdsh.datePattern=Y-m-dlog4php.appender.mdsh.file=../../log/services.mdsh/%s.loglog4php.appender.mdsh.layout=LoggerLayoutPatternlog4php.appender.mdsh.layout.ConversionPattern="[%date{Y-m-d H:i:s}] %5p - %m%n"