I need to create a error log file in codeigniter. As per the rules i changed the value $config['log_threshold'] = 1; in config.php file. Error log file was created in the logs folder. But i wrongly deleted that file. I wrote the coding like this
$data['name'] = "Somename";
$add_department = $this->db->insert('mas_factory',$data);
if($add_department == false)
{
log_message('error', 'Table field name is wrong.');
}
error log file is not automatically generated. But i need to see the error messages in error log file. How to create a log file.