[eluser]Lockzi[/eluser]
Hello,
let me start by saying that the name might not be appropriate to what it is doing, didn't know what to call this, one-time-run/instance/request-logger, but whatever here we go.
I got sick of having to go into todays log file (everyday) and deleting the content to easily get and distinguish the errors from a request.
Therefore I wrote an replacement for the core log class and thought I could share it.
This is optional (as variables are defined with default values in the class) and can be added anywhere in the config.php if so:
application/config/config.php
Code:
/*
|--------------------------------------------------------------------------
| Instance Error Logging
|--------------------------------------------------------------------------
| do_instance
| TRUE = Log this instance in separate overwrited file
| FALSE = Do no separate log file writing
|
| instance_log_filename
| Leave this BLANK unless you would like to set something other than the default
| filename 'log-lastInstance' for your instance log. Do not add file extension.
|
*/
$config['do_instance'] = TRUE;
$config['instance_log_filename'] = 'log-lastInstance';