You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/administration/recent_activity/recent_activity.md
+53-10Lines changed: 53 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,35 +10,62 @@ Recent activity log displays last actions in the repository (whatever their orig
10
10
11
11
To learn more about its back office usage and the actions logged by default, see [Recent activity in User Documentation]([[= user_doc =]]/recent_activity/recent_activity/).
12
12
13
-
## Configuration and cronjob
13
+
## Configuration
14
14
15
-
With some configuration, you can customize the log length in the database or on screen.
15
+
With some configuration, you can customize the log length in the database or on screen, or disable the logging completely.
16
16
A command maintains the log size in database, it should be scheduled through CRON.
17
17
18
-
- The configuration `ibexa.system.<scope>.activity_log.pagination.activity_logs_limit` sets the number of log items shown per page in the back office (default value: 25).
19
-
A log item is a group of entries, or an entry without group.
20
-
-The configuration `ibexa.repositories.<repository>.activity_log.truncate_after_days` sets the number of days a log entry is kept before it's deleted by the `ibexa:activity-log:truncate` command (default value: 30 days).
18
+
### Log retention
19
+
20
+
The `ibexa.repositories.<repository>.activity_log.truncate_after_days` setting sets the number of days a log entry is kept before it's deleted by the `ibexa:activity-log:truncate` command (default value: 30 days).
21
21
22
-
For example, the following configuration sets 15 days of life to the log entries on the `default` repository, and 20 context groups per page for the `admin_group` SiteAccess group:
22
+
For example, the following configuration sets 15 days of life to the log entries on the `default` repository:
23
23
24
24
```yaml
25
25
ibexa:
26
26
repositories:
27
27
default:
28
28
activity_log:
29
29
truncate_after_days: 15
30
+
```
31
+
32
+
To automate a regular truncation, the command `ibexa:activity-log:truncate` must be added to a crontab.
33
+
To minimize the number of entries to delete, it's recommended to execute the command more than one time a day.
The `ibexa.system.<scope>.activity_log.pagination.activity_logs_limit` setting sets the number of log items shown per page in the back office (default value: 25).
41
+
42
+
For example, the following configuration sets 20 context groups per page for the `admin_group` SiteAccess group:
43
+
44
+
```yaml
45
+
ibexa:
30
46
system:
31
47
admin_group:
32
48
activity_log:
33
49
pagination:
34
50
activity_logs_limit: 20
35
51
```
52
+
A log item is a group of entries, or an entry without group.
36
53
37
-
To automate a regular truncation, the command `ibexa:activity-log:truncate` must be added to a crontab.
38
-
To minimize the number of entries to delete, it's recommended to execute the command more than one time a day.
The `ibexa.repositories.<repository>.activity_log.enabled` setting can disable activity log entirely for a given [repository](repository_configuration.md).
57
+
58
+
For example, to disable the activity log for the `default` repository:
59
+
60
+
```yaml
61
+
ibexa:
62
+
repositories:
63
+
default:
64
+
activity_log:
65
+
enabled: false
66
+
```
67
+
68
+
You can also disable activity log for a single action by using the [PHP API](#disable-logging-activities).
42
69
43
70
## Permission and security
44
71
@@ -132,6 +159,7 @@ migration
132
159
Keep activity logging as light as possible.
133
160
Don't make database requests or heavy computation at logging time.
134
161
Keep them for activity log list display time.
162
+
If needed, you can [disable logging for specific operations](#disable-logging-activities) using the PHP API.
135
163
136
164
#### Create an entry
137
165
@@ -259,6 +287,21 @@ Thanks to the previous subscriber, the related object is available at display ti
You can disable logging the activities with PHP API, for example, when loading large amounts of data in cases where you don't want logging to slow down the process or the actions to be included in the log.
before running the relevant code, then [`ActivityLogService::enable()`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-ActivityLog-ActivityLogServiceInterface.html#method_enable) to restore the logging process:
When disabled, any call to [`ActivityLogService::save()`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-ActivityLog-ActivityLogServiceInterface.html#method_save) has no effect and no entries are written to the database.
302
+
303
+
You can check the current state with [`ActivityLogService::isEnabled()`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-ActivityLog-ActivityLogServiceInterface.html#method_isEnabled) and [`ActivityLogService::isDisabled()`](/api/php_api/php_api_reference/classes/Ibexa-Contracts-ActivityLog-ActivityLogServiceInterface.html#method_isDisabled).
0 commit comments