Skip to content

Commit a1f4910

Browse files
committed
Adding comment.
1 parent 3483c6d commit a1f4910

File tree

1 file changed

+8
-2
lines changed
  • Diagnostics/PostSharp.Samples.Logging.PerRequest

1 file changed

+8
-2
lines changed

Diagnostics/PostSharp.Samples.Logging.PerRequest/Program.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
using PostSharp.Patterns.Diagnostics.Adapters.AspNetCore;
1212
using PostSharp.Patterns.Diagnostics.Backends.Console;
1313

14-
[assembly:Log]
14+
[assembly: Log]
15+
1516
namespace PostSharp.Samples.Logging.PerRequest
1617
{
1718
public class Program
@@ -21,7 +22,12 @@ public static void Main(string[] args)
2122

2223
AspNetCoreLogging.Initialize();
2324
LoggingServices.DefaultBackend = new ConsoleLoggingBackend();
24-
LoggingServices.DefaultBackend.ConfigureFromXml(XDocument.Load("postsharp-logging.config"));
25+
26+
// This loads the configuration file from disk.
27+
// You can also store this file in a cloud storage service and use ConfigureFromXmlWithAutoReloadAsync
28+
// to load it and have it automatically reload every minute or so, so you can dynamically
29+
// change the verbosity.
30+
LoggingServices.DefaultBackend.ConfigureFromXml(XDocument.Load("postsharp-logging.config"));
2531

2632
CreateHostBuilder(args).Build().Run();
2733
}

0 commit comments

Comments
 (0)