Tag Archives: logging

Common.Logging

Image courtesy of Ales Krivec / unsplash.com https://www.nuget.org/packages/Common.Logging/ Common.logging provides an abstraction for the logging framework of choice. For IoC the common.logging offers an interface. NoOpLogger is a fake implementation used for unit testing. I prefer to use the nuget from log4net with … Continue reading

Posted in Development, Tooling | Tagged , , , , , | Leave a comment

Setup logging in configuration with powershell

Manipulation of config files with notepad is a burden for every developer / operator. It is the source of many errors. With DEVOPS we try to automate this process. The result is less prone to errors. See the powershell script … Continue reading

Posted in Tooling | Tagged , , , , , | Leave a comment

Add tracelistener with powershell

In our deployment script we automate the installation and configuration of our product. For Development and Test environment we want to log everything to a file. The powershell script below takes care of adding TextWriterTraceListener to the trace listeners. The … Continue reading

Posted in Development | Tagged , , | Leave a comment

Trace to Windows EventLog

In dotNET we use the System.Diagnostics.Trace and some TraceListerner implementation to log information, warnings and errors. My applications use the Windows Eventlog with the EventLogTraceListener. But what if your custom EventSource is not available and your user has no administrative … Continue reading

Posted in Development | Tagged , , , , , , | Leave a comment