Configuration
Out of the box, you don't have to configure Logit, but if you want to change any of the default settings, you can do so by adding the following array key to your config.php
file. In this example, you are changing the values of 2 settings.
Logit will perform an array_replace()
with it's default options (seen below) with what is in your config.php
file, thus if you only need to add to your config.php
file what you want to change.
For example, if you choose to set 'Comment' => true
, which means Logit will log every time a comment is created, updated, or deleted. Then you will add this to your config.php file.
Default Logit settings.
Logging to PHP's error_log or custom directory
You can optionally send all logs to your server's PHP error_log
by setting the 'path'
option to 'error_log'
. Your server and PHP must be configured with a valid log path for this to work. Generally this is setup by default on each server.
You can optionally write the log files to a custom directory that is not the PHP error_log or your EE cache directory. Remember, all logging goes to the database by default, and then rotated to the ee/system/user/cache/logit
directory. You can skip the database logging and log directly to a custom directory.
Remote Backups
By default Logit saves all logs, when rotation is enabled, in your user/cache
folder, but it is recommended to save logs to a different location. Logit only uses the default user/cache
folder because it should be writable as part of ExpressionEngine's default configuration. It is common for 3rd party add-ons to flush the cache, so you want to avoid having your logs accidently deleted by another add-on. For this reason it is highly suggested to choose another local directory path, or use an Amazon S3 bucket. You can manually relocate your log rotation files as needed, such as above the web root. If your public directory is /var/www/html/public
, you may want to save logs to /var/www/html/logs
. To do that, set the storage['local']['path']
value in your config.php
file. The same process may be taken if you decide to add an S3 bucket.
As noted in the default configuration array, if storage['s3']
is provided, then Logit will save all logs to the defined bucket. BoldMinded does not provide support in creating and configuring permissions to S3. If you have issues connecting to the bucket, you will receive an error message and will need to self diagnose and fix the issue.
Last updated