markhilton/monolog-mysql

Log::debug 如何兼容

Opened this issue · 0 comments

// 这样主动记录日志
\Illuminate\Support\Facades\Log::debug('test');

就会报错:
SQLSTATE[HY000] [2002] Connection refused (SQL: insert into logs (instance, message, channel, level, level_name, context, remote_addr, user_agent, created_by, created_at) values (49494f8720a8, Allowed memory size of 268435456 bytes exhausted (tried to allocate 43042376 bytes), local, 400, ERROR, {"exception":{}}, 2887122945, Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36, ?, 2023-11-02 11:42:41))