Logging in PowerShell with System.Diagnostics.TraceSource and log4net
Microsoft .NET offers a very flexible logging system exposed via the System.Diagnostics namespace. Unfortunately (and not surprisingly), by default the pre-packaged listeners do not support writing messages to log4net directly. However, we can extend the logging outputs by implementing custom TraceListeners and when asking our favourite search engine for “TraceListener log4net” we find there are already plenty of implementations of […]