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: doc/Settings.md
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -286,6 +286,35 @@ In addition, there are special values that cover multiple channels. `default` i
286
286
},
287
287
```
288
288
289
+
### file
290
+
291
+
The `file` settings control the log files generated by winget during operation. These settings apply to the automatic cleanup that happens whenever a Windows Package Manager process is run.
292
+
They only apply to the default log location, which contains winget logs, AppInstaller logs (the MSIX install UI), and is the default location where installer logs are placed.
293
+
The automatic cleanup happens at the beginning of the process, so the log file(s) generated by the current process will not be considered in the limits.
294
+
295
+
|Setting|Description|Default|Note|
296
+
|---|---|---|---|
297
+
|`ageLimitInDays`|The maximum age, in days, of files in the log directory; older files are deleted.|7 (days)|Set to 0 to disable this limit.|
298
+
|`totalSizeLimitInMB`|The maximum size, in megabytes, of all files in the log directory; the oldest files are deleted first.|128 (MB)|Set to 0 to disable this limit.|
299
+
|`countLimit`|The maximum number of files in the log directory; the oldest files are deleted first.|0|Set to 0 (the default) to disable this limit.|
300
+
301
+
These settings apply to the log files that winget writes, only as they are being written. They do not apply to files written by installers or the AppInstaller UI.
302
+
303
+
|Setting|Description|Default|Note|
304
+
|---|---|---|---|
305
+
|`individualSizeLimitInMB`|The maximum size, in megabytes, of an individual log file. If a file would exceed this limit, the logs will wrap. Note that this limit is approximate and the actual files may exceed it by a few bytes.|16 (MB)|Set to 0 to disable this limit.|
306
+
307
+
```json
308
+
"logging": {
309
+
"file": {
310
+
"ageLimitInDays": 7,
311
+
"totalSizeLimitInMB": 128,
312
+
"countLimit": 0,
313
+
"individualSizeLimitInMB": 16,
314
+
}
315
+
},
316
+
```
317
+
289
318
## Network
290
319
291
320
The `network` settings influence how winget uses the network to retrieve packages and metadata.
Copy file name to clipboardExpand all lines: schemas/JSON/settings/settings.schema.0.2.json
+30Lines changed: 30 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -80,6 +80,36 @@
80
80
},
81
81
"minItems": 0,
82
82
"maxItems": 20
83
+
},
84
+
"file": {
85
+
"description": "The file settings control the log files generated by winget during operation.",
86
+
"type": "object",
87
+
"properties": {
88
+
"ageLimitInDays": {
89
+
"description": "The maximum age, in days, of a log file before it is deleted. Set to 0 to disable automatic deletion based on age.",
90
+
"type": "integer",
91
+
"default": 7,
92
+
"minimum": 0
93
+
},
94
+
"totalSizeLimitInMB": {
95
+
"description": "The maximum total size, in megabytes, of all log files. If the total size exceeds this limit, the oldest files will be deleted first. Set to 0 to disable this limit.",
96
+
"type": "integer",
97
+
"default": 128,
98
+
"minimum": 0
99
+
},
100
+
"countLimit": {
101
+
"description": "The maximum number of log files to retain. If the number of log files exceeds this limit, the oldest files will be deleted first. Set to 0 (the default) to disable this limit.",
102
+
"type": "integer",
103
+
"default": 0,
104
+
"minimum": 0
105
+
},
106
+
"individualSizeLimitInMB": {
107
+
"description": "The maximum size, in megabytes, of an individual log file. If a file would exceed this limit, new log lines will overwrite the file from the beginning. Set to 0 to disable this limit.",
0 commit comments