开发者

Problems with Kohana Logs

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜