1234567891011121314151617181920212223242526272829303132333435363738 |
-
- using SuperSocket.SocketBase;
- using SuperSocket.SocketBase.Logging;
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- 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);
- }
- }
- }
|