Skip to content

Commit

Permalink
Update code snippet for Azure Diagnostics Log Stream configuration
Browse files Browse the repository at this point in the history
Update code snippet to add support for non-Windows based App Service
  • Loading branch information
Ky7m authored Feb 24, 2022
1 parent f1e6499 commit e810384
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,13 @@ The Azure Diagnostic Log Stream ships events from any files in the `D:\home\LogF
.WriteTo.Console()
// Add this line:
.WriteTo.File(
@"D:\home\LogFiles\Application\myapp.txt",
fileSizeLimitBytes: 1_000_000,
rollOnFileSizeLimit: true,
shared: true,
flushToDiskInterval: TimeSpan.FromSeconds(1))
System.IO.Path.Combine(Environment.GetEnvironmentVariable("HOME"), "LogFiles", "Application", "diagnostics.txt"),
rollingInterval: RollingInterval.Day,
fileSizeLimitBytes: 10 * 1024 * 1024,
retainedFileCountLimit: 2,
rollOnFileSizeLimit: true,
shared: true,
flushToDiskInterval: TimeSpan.FromSeconds(1))
.CreateLogger();
```

Expand Down

0 comments on commit e810384

Please sign in to comment.