Skip to content

Commit 254c170

Browse files
committed
Added additional logging settings
1 parent b7e39f9 commit 254c170

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

16/umbraco-cms/reference/configuration/loggingsettings.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ The following configuration is available in the Logging settings:
1313
"CMS": {
1414
"Logging": {
1515
"MaxLogAge": "2.00:00:00",
16-
"Directory": "~/CustomLogFileLocation"
16+
"Directory": "~/CustomLogFileLocation",
17+
"FileNameFormat": "UmbracoTraceLog.{0}..json",
18+
"FileNameFormatArguments": "MachineName"
1719
}
1820
}
1921
}
@@ -30,3 +32,22 @@ To increase the maximum age of the entries in the audit log to 48 hours (2 days)
3032
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.
3133

3234
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

Comments
 (0)