Skip to content

Commit e810384

Browse files
authored
Update code snippet for Azure Diagnostics Log Stream configuration
Update code snippet to add support for non-Windows based App Service
1 parent f1e6499 commit e810384

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

README.md

Lines changed: 7 additions & 5 deletions
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)