Monday, November 10, 2014

Logging Utility

Background

Sometimes you need to introduce excessive logging in a workflow, web application, complex runtime application logging is a very important thing in order to identify issues. I have a logger by looking into various loggers available over the web. The sole purpose of this logger for me was to be applied to a workflow which was written in C# using Windows Workflow Foundation.

Logging seems quite easy if it's an application which runs one time or is a sequential one where the rate of concurrent users is less or negligible you just write all the logging lines down in a file and that's all. But imagine when there are multiple people working on an application for which you are logging you will definitely come across the issue of writing to the file when it's already in use.

Implementation Details 


Here are details of the workflow with a test application; I have tried up to 20 threads which are trying to access the file for writing and its working fine.