File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Diagnostics/PostSharp.Samples.Logging.PerRequest Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1111using PostSharp . Patterns . Diagnostics . Adapters . AspNetCore ;
1212using PostSharp . Patterns . Diagnostics . Backends . Console ;
1313
14- [ assembly: Log ]
14+ [ assembly: Log ]
15+
1516namespace 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 }
You can’t perform that action at this time.
0 commit comments