Bloqs
Custom System Messages
Publisher
Reading Time PRo
Simple Grids & Tables
Speedy
Powered By GitBook
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.
1
$config['logit'] = [
2
'rotate' => 30,
3
'detailedLogs' => true,
4
];
Copied!
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.
1
$config['logit'] = [
2
'log' => [
3
'models' => [
4
'Comment' => true
5
],
6
],
7
];
Copied!
Default Logit settings.
1
$config['logit'] = [
2
'detailedLogs' => false, // Append full JSON object of saved data with the log?
3
'frontendLogs' => true, // Log updates in front-end requests? E.g. Channel:Form
4
'log' => [
5
'models' => [
6
'Category' => true,
7
'CategoryField' => true,
8
'CategoryGroup' => true,
9
'Channel' => true,
10
'ChannelField' => true,
11
'ChannelEntry' => true,
12
'ChannelFormSettings' => true,
13
'ChannelLayout' => true,
14
'Comment' => false, // Disabled by default, could lead to a lot of logs on a busy site.
15
'GlobalVariable' => true,
16
'Site' => true,
17
'Snippet' => true,
18
'SpecialtyTemplate' => true,
19
'Status' => true,
20
'Template' => true,
21
'TemplateGroup' => true,
22
'TemplateRoute' => true,
23
'Member' => true,
24
'Role' => true,
25
'RoleGroup' => true,
26
'RoleSetting' => true,
27
'Permission' => true,
28
],
29
'postActions' => [
30
'cp\/(addons\/settings)\/(\S+)' => true,
31
'cp\/(addons)' => true,
32
'cp\/(settings)\/(\S+)' => true,
33
],
34
'getActions' => [
35
'cp\/(addons\/install)\/(\S+)' => true,
36
'cp\/(addons\/remove)\/(\S+)' => true,
37
],
38
],
39
'rotate' => 0, // How often should logs be rotated (in days)?
40
/*
41
The default storage locations for log backups is in your site's user/cache/logit folder, however, it is
42
recommended to use an external storage service such as Amazon S3 to ensure the log files are not accidentally
43
deleted. Alternatively, you can create a folder outside of your user/cache folder to circumvent EE's cache clearing,
44
which will delete the contents in the user/cache folder.
45
*/
46
'storage' => [
47
'local' => [
48
'path' => PATH_CACHE.'logit',
49
],
50
51
/*
52
BoldMinded will not assist in creating or troubleshooting S3 access. You will need to configure your account,
53
bucket, user, group, and IAM roles and permissions. If you do not configure permissions correctly, Logit will
54
throw an exception error... this is how you will know something is incorrect with the values below, or with
55
your user, group, or IAM settings in AWS.
56
57
's3' => [
58
'key' => '',
59
'secret' => '',
60
'bucket' => '',
61
'region' => 'us-east-2' // aka, "US East (Ohio)" https://docs.aws.amazon.com/general/latest/gr/rande.html
62
'path' => '',
63
]
64
*/
65
],
66
];
Copied!

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 modified 7mo ago
Copy link