using SuperSocket.SocketBase.Logging;
using System.Collections.Generic;

namespace OCPPServer.SubProtocol
{
    /// <summary>
    /// OCPP log factory
    /// </summary>
    public class OCPPLogFactory : LogFactoryBase
    {
        public OCPPLogFactory() : this("NLog.config")
        {

        }

        public OCPPLogFactory(string log4netConfig)
            : base(log4netConfig)
        {
            List<string> configlist = new List<string>();
            configlist.Add(ConfigFile);
            NLog.Config.XmlLoggingConfiguration.SetCandidateConfigFilePaths(configlist);
        }

        public override SuperSocket.SocketBase.Logging.ILog GetLog(string name)
        {

            return new OCPPLog(name);
        }
    }

}
