输出日志级别是 notice
public function notice(mixed $data, array $context = array())
数据源, 大括号成对的内容,会被context替换
标签替换, 类似PHP函数 strtr, 但这里只支持数组
日志写入成功返回 true, 否则返回 false
<?php define('LOG_PATH', '/data/logs/'); $logger = new Asf_Log_Adapter_File('biz-dd_log', LOG_PATH); var_dump($logger->notice(json_encode(array('a', 'b', 'c' => 123)))); var_dump($logger->notice('xxxxx'));
<?php define('LOG_PATH', '/www/logs/') $logger = new Asf_Log_Adapter_File('biz-dd_log', LOG_PATH); var_dump($logger->notice('xxxx{xy}y{yz}zz', array('xy' => 'AA', 'yz' => 'MM')));