Skip to content

Commit f1cdcd7

Browse files
authored
Merge pull request #290 from Ky7m/patch-1
Update code snippet for Azure Diagnostics Log Stream configuration
2 parents f1e6499 + e810384 commit f1cdcd7

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

README.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,13 @@ The Azure Diagnostic Log Stream ships events from any files in the `D:\home\LogF
285285
.WriteTo.Console()
286286
// Add this line:
287287
.WriteTo.File(
288-
@"D:\home\LogFiles\Application\myapp.txt",
289-
fileSizeLimitBytes: 1_000_000,
290-
rollOnFileSizeLimit: true,
291-
shared: true,
292-
flushToDiskInterval: TimeSpan.FromSeconds(1))
288+
System.IO.Path.Combine(Environment.GetEnvironmentVariable("HOME"), "LogFiles", "Application", "diagnostics.txt"),
289+
rollingInterval: RollingInterval.Day,
290+
fileSizeLimitBytes: 10 * 1024 * 1024,
291+
retainedFileCountLimit: 2,
292+
rollOnFileSizeLimit: true,
293+
shared: true,
294+
flushToDiskInterval: TimeSpan.FromSeconds(1))
293295
.CreateLogger();
294296
```
295297

0 commit comments

Comments
 (0)