jnbdz
jnbdz

Reputation: 4383

Problems with Kohana Logs

For some reason I cannot get 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.

Upvotes: 0

Views: 701

Answers (1)

laurent
laurent

Reputation: 90776

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.

Upvotes: 2

Related Questions