|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.Configuration;
namespace DiagnosticExplorer.Web
{
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "LoggingService" in code, svc and config file together.
public class LoggingService : ILogWriter
{
private static ILogWriter _logger;
private ILogWriter Logger
{
get
{
if (_logger == null)
{
string ioType = ConfigurationManager.AppSettings["ILogWriter"];
_logger = (ILogWriter)Activator.CreateInstance(Type.GetType(ioType));
}
return _logger;
}
}
public void WriteMessage(DiagnosticMsg msg)
{
Logger.WriteMessage(msg);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I am a software developer originally from Auckland, New Zealand. I have lived and worked in London since 2005.