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
Or in XML [app-settings format](https://github.com/serilog/serilog/wiki/AppSettings):
17
+
> **Important:** Only one process may write to a log file at a given time. For multi-process scenarios, either use separate files or one of the non-file-based sinks.
18
+
19
+
### `<appSettings>` configuration
20
+
21
+
The sink can be configured in XML [app-settings format](https://github.com/serilog/serilog/wiki/AppSettings) if the _Serilog.Settings.AppSettings_ package is in use:
> **Important:** Only one process may write to a log file at a given time. For multi-process scenarios, either use separate files or one of the non-file-based sinks.
28
+
### JSON formatting
29
+
30
+
To emit JSON, rather than plain text, a formatter can be specified:
31
+
32
+
```csharp
33
+
.WriteTo.File(newJsonFormatter(), "log.txt")
34
+
```
35
+
36
+
To configure an alternative formatter in XML `<appSettings>`, specify the formatter's assembly-qualified type name as the setting `value`.
0 commit comments