CodeIgniter Forums
Preventing error from log file - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: Preventing error from log file (/thread-9483.html)



Preventing error from log file - El Forum - 06-26-2008

[eluser]steelaz[/eluser]
Setup:

Fresh CI 1.6.2 install
$config['log_threshold'] = 1;

Code:

Code:
$string = 0;        

if (FALSE === ($result = @unserialize($string)))
{
    echo "false";
}
else
{
    var_dump($result);
}

I suppress error message from showing up by adding '@' to 'unserialize', but it still gets into log file. I use this function a lot and log file becomes unreadable. Is there any way to prevent CI from logging this?