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: 16/umbraco-cms/reference/configuration/loggingsettings.md
+22-1Lines changed: 22 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,9 @@ The following configuration is available in the Logging settings:
13
13
"CMS": {
14
14
"Logging": {
15
15
"MaxLogAge": "2.00:00:00",
16
-
"Directory": "~/CustomLogFileLocation"
16
+
"Directory": "~/CustomLogFileLocation",
17
+
"FileNameFormat": "UmbracoTraceLog.{0}..json",
18
+
"FileNameFormatArguments": "MachineName"
17
19
}
18
20
}
19
21
}
@@ -30,3 +32,22 @@ To increase the maximum age of the entries in the audit log to 48 hours (2 days)
30
32
By default, all log files are saved to the `umbraco/Logs` directory. You can define a custom directory for your log files by using the `Directory` key in the Logging settings.
31
33
32
34
Set the value to `~/LogFiles` to add all log files to a `LogFiles` directory in the root of the file structure.
35
+
36
+
## FileNameFormat
37
+
38
+
The default file name format for the Umbraco log file is `UmbracoTraceLog.{0}..json`. The single argument is replaced at runtime with the server's machine name.
39
+
40
+
If you want to change the file name or include additional arguments, you can amend the format with this setting.
41
+
42
+
## FileNameFormatArguments
43
+
44
+
By default the single argument for the log file format name is the server's machine name.
45
+
46
+
Other or additional arguments can be provided via this setting as a comma delimited string:
47
+
48
+
-`MachineName` - the server's name.
49
+
-`EnvironmentName` - the ASP.NET environment name such as "Development" or "Production.
50
+
51
+
So for example, to provide both supported arguments you would configure `MachineName,EnvironmentName`.
52
+
53
+
The number of arguments provided should match the placeholders in the configured `FileNameFormat`.
0 commit comments