i need a logs from codeigniter 3. But i got this error message,
A PHP Error was encountered
Severity: Warning
Message: mkdir(): Permission denied
Filename: core/Log.php
Line Number: 122
Backtrace:
File: /home/admin/mysite/index.php Line: 292 Function: require_once
How can i solve this?
CodeIgniter has some error logging functions built in. You can log any errors to system log with function log_message
Also you can set log level in your application/config/config.php here is the sample settings:
/*
|--------------------------------------------------------------------------
| Error Logging Threshold
|--------------------------------------------------------------------------
| 0 = Disables logging, Error logging TURNED OFF
| 1 = Error Messages (including PHP errors)
| 2 = Debug Messages
| 3 = Informational Messages
| 4 = All Messages|
*/
$config['log_threshold'] = 1;
log_message('error', 'Some variable did not contain a value.');
Hope it will help you.