开发者

Problems with Kohana Logs

开发者 https://www.devze.com 2023-04-07 02:00 出处:网络
For some reason I cannot get开发者_StackOverflow社区 kohana to log my custom errors. Here is the code:

For some reason I cannot get开发者_StackOverflow社区 kohana to log my custom errors. Here is the code:

$log = new Log;
$log->add(Log::ERROR, 'There was a conflic with the username and/or email. UUID: '.$user['uuid'].' username: '.$user['username'].' email: '.$user['email']);

Thanks in advance for any help.


The simplest way would be to use Kohana's built-in logger since it's already setup:

Kohana::$log->add(Log::ERROR, "your debug info")->write();

Otherwise, if you want to use a custom one, make sure you assign a writer to it - it can be file, database, etc.

0

精彩评论

暂无评论...
验证码 换一张
取 消