1
0
Fork 0
forked from wry/wry

Add clean-logs-older-than option

This commit is contained in:
khyperia 2026-03-27 07:44:34 +01:00 committed by Julian Orth
parent 4c7d108e09
commit 880c98ecfb
17 changed files with 360 additions and 10 deletions

View file

@ -645,6 +645,23 @@
}
]
},
"CleanLogsOlderThan": {
"description": "The definition of how old logfiles need to be for them to be automatically deleted.\n\nOmitted values are set to 0. At least one of `weeks` or `days` must be specified.\n\n- Example:\n\n ```toml\n clean-logs-older-than.weeks = 2\n ```\n",
"type": "object",
"properties": {
"weeks": {
"type": "number",
"description": "The number of weeks.",
"minimum": 0.0
},
"days": {
"type": "number",
"description": "The number of days.",
"minimum": 0.0
}
},
"required": []
},
"ClickMethod": {
"type": "string",
"description": "The click method to apply to an input device.\n\nSee the libinput documentation for more details.\n",
@ -964,6 +981,10 @@
"description": "Sets the log level of the compositor.\n\nThis setting cannot be changed by re-loading the configuration. Use\n`jay set-log-level` instead.\n\n- Example:\n\n ```toml\n log-level = \"debug\"\n ```\n",
"$ref": "#/$defs/LogLevel"
},
"clean-logs-older-than": {
"description": "If specified on startup, deletes Jay's log files older than the specified time period.\n\nPossible keys in the table are `days` and `weeks`.\n\n- Example:\n\n ```toml\n clean-logs-older-than.days = 7\n ```\n",
"$ref": "#/$defs/CleanLogsOlderThan"
},
"theme": {
"description": "Sets the theme of the compositor.\n",
"$ref": "#/$defs/Theme"

View file

@ -960,6 +960,40 @@ The string should have one of the following values:
The brightness in cd/m^2.
<a name="types-CleanLogsOlderThan"></a>
### `CleanLogsOlderThan`
The definition of how old logfiles need to be for them to be automatically deleted.
Omitted values are set to 0. At least one of `weeks` or `days` must be specified.
- Example:
```toml
clean-logs-older-than.weeks = 2
```
Values of this type should be tables.
The table has the following fields:
- `weeks` (optional):
The number of weeks.
The value of this field should be a number.
The numbers should be greater than or equal to 0.
- `days` (optional):
The number of days.
The value of this field should be a number.
The numbers should be greater than or equal to 0.
<a name="types-ClickMethod"></a>
### `ClickMethod`
@ -1836,6 +1870,20 @@ The table has the following fields:
The value of this field should be a [LogLevel](#types-LogLevel).
- `clean-logs-older-than` (optional):
If specified on startup, deletes Jay's log files older than the specified time period.
Possible keys in the table are `days` and `weeks`.
- Example:
```toml
clean-logs-older-than.days = 7
```
The value of this field should be a [CleanLogsOlderThan](#types-CleanLogsOlderThan).
- `theme` (optional):
Sets the theme of the compositor.

View file

@ -2680,6 +2680,19 @@ Config:
```toml
log-level = "debug"
```
clean-logs-older-than:
ref: CleanLogsOlderThan
required: false
description: |
If specified on startup, deletes Jay's log files older than the specified time period.
Possible keys in the table are `days` and `weeks`.
- Example:
```toml
clean-logs-older-than.days = 7
```
theme:
ref: Theme
required: false
@ -3218,6 +3231,31 @@ GracePeriod:
required: false
CleanLogsOlderThan:
kind: table
description: |
The definition of how old logfiles need to be for them to be automatically deleted.
Omitted values are set to 0. At least one of `weeks` or `days` must be specified.
- Example:
```toml
clean-logs-older-than.weeks = 2
```
fields:
weeks:
description: The number of weeks.
kind: number
minimum: 0
required: false
days:
description: The number of days.
kind: number
minimum: 0
required: false
RepeatRate:
kind: table
description: |