From e810384e3f21a8559288340c088306e1dfb22a82 Mon Sep 17 00:00:00 2001 From: Igor Fesenko Date: Wed, 23 Feb 2022 16:07:30 -0800 Subject: [PATCH] Update code snippet for Azure Diagnostics Log Stream configuration Update code snippet to add support for non-Windows based App Service --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4636c62..379d595 100644 --- a/README.md +++ b/README.md @@ -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(); ```