title: log file in Codeigniter
body: <p>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 </p>
  
  <pre><code> $data['name'] = "Somename";
   $add_department = $this-&gt;db-&gt;insert('mas_factory',$data);
   if($add_department == false)
   { 
       log_message('error', 'Table field name is wrong.');    
   }
  </code></pre>
  
  <p>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.  </p>