Closed coolsharkll closed 4 years ago
干净的biny用\biny\lib\TXEvent::one(onSql);可以看到sql输出到控制台. 但是我这边的开发环境写了不报错也不输出到控制台.能让sql输出到日志去吗?像TXLogger一样.我现在只能故意写错sql来看sql的报错来检查sql.
TXLogger::addLog 和 TXLogger::addError 是有写文件的功能的 前提需要在 /config/config.php 中 把 logger 中的file字段置为 true 另外Biny也支持自定义日志记录 可以在 logger中配置 sendLog 和 sendError方法
干净的biny用\biny\lib\TXEvent::one(onSql);可以看到sql输出到控制台. 但是我这边的开发环境写了不报错也不输出到控制台.能让sql输出到日志去吗?像TXLogger一样.我现在只能故意写错sql来看sql的报错来检查sql.