Welcome Guest, Not a member yet? Register   Sign In
Single Log Files
#4

[eluser]Madalina.C[/eluser]
Here is the steps to take to make it one file.

Take
Code:
system/libraries/Log.php

and copy it to

Code:
system/application/libraries

Replace the line
Code:
$filepath = $this->log_path.'log-'.date('Y-m-d').EXT;

With

Code:
$config =& get_config();
$filepath = $this->log_path.'log-CI-'.str_replace(array("http://","/"),"",$config['base_url']).EXT;
(You can change the middle str_replace part with whatever you want, I just removed slashes and unnecessary characters)

It now creates the file
Code:
log-CI-some-site.php

Be sure to have some system in place to clear/move it or it might esplode in size


Messages In This Thread
Single Log Files - by El Forum - 05-27-2010, 11:27 AM
Single Log Files - by El Forum - 05-27-2010, 12:13 PM
Single Log Files - by El Forum - 05-27-2010, 12:39 PM
Single Log Files - by El Forum - 05-27-2010, 01:11 PM



Theme © iAndrew 2016 - Forum software by © MyBB