Logger C# code