How to disable logging in Codeigniter?
Logging can be configured per application, it's done in
/application/config.php
The setting in question is $config['log_path']
.
If you want to disable logging, set the threshold to 0:
$config['log_threshold'] = 0;
But I wonder a bit if you have three applications why they log into the same log folder. Each application should have it's own log folder.
Take a look in index.php
for each application:
/* * ------------------------------------------------------------------- * CUSTOM CONFIG VALUES * ------------------------------------------------------------------- * * The $assign_to_config array below will be passed dynamically to the * config class when initialized. This allows you to set custom config * items or override any default config values found in the config.php file. * This can be handy as it permits you to share one application between * multiple front controller files, with each file containing different * config values. * * Un-comment the $assign_to_config array below to use this feature * */ // $assign_to_config['name_of_config_item'] = 'value of config item';
I've never personally used this, but it seems to suggest that each separate app can override the settings in config.php
using a shared application. So you should be able to do something like this in each individual index file:
$assign_to_config['log_threshold'] = 0;// OR$assign_to_config['log_path'] = 'app3/logs/';