forked from postsharp/PostSharp.Samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
22 lines (19 loc) · 700 Bytes
/
Copy pathProgram.cs
File metadata and controls
22 lines (19 loc) · 700 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using PostSharp.Patterns.Diagnostics;
using PostSharp.Patterns.Diagnostics.Backends.Console;
using PostSharp.Samples.Logging.BusinessLogic;
// Add logging to all methods of the current project.
[assembly: Log]
namespace PostSharp.Samples.Logging.Console
{
[Log(AttributeExclude = true)] // Removes logging from the Program class itself.
internal class Program
{
private static void Main(string[] args)
{
// Configure PostSharp Logging to output logs to the console.
LoggingServices.DefaultBackend = new ConsoleLoggingBackend();
// Simulate some business logic.
QueueProcessor.ProcessQueue(@".\Private$\SyncRequestQueue");
}
}
}