Tencent / Biny

Biny is a tiny, high-performance PHP framework for web applications
BSD 3-Clause "New" or "Revised" License
1.69k stars 259 forks source link

大大麻烦再问下sql语句调试的问题 #69

Closed coolsharkll closed 4 years ago

coolsharkll commented 6 years ago

干净的biny用\biny\lib\TXEvent::one(onSql);可以看到sql输出到控制台. 但是我这边的开发环境写了不报错也不输出到控制台.能让sql输出到日志去吗?像TXLogger一样.我现在只能故意写错sql来看sql的报错来检查sql.

billge1205 commented 6 years ago

TXLogger::addLog 和 TXLogger::addError 是有写文件的功能的 前提需要在 /config/config.php 中 把 logger 中的file字段置为 true 另外Biny也支持自定义日志记录 可以在 logger中配置 sendLog 和 sendError方法