/// <summary> /// 指定日志的路径生成工厂,初始化一个 <see cref="StreamTextWriterFactory"/> 类的新实例。 /// </summary> /// <param name="logPathFactory">日志的路径生成工厂。</param> public StreamTextWriterFactory(ILogPathFactory logPathFactory) { if(logPathFactory == null) throw new ArgumentNullException(nameof(logPathFactory)); this.LogPathFactory = logPathFactory; this.LogFolder = GA.FullPath("Logs"); this.LogExtension = ".log"; this.Encoding = Encoding.UTF8; }
/// <summary> /// 指定日志的路径生成工厂,初始化一个 <see cref="Aoite.Logger.StreamTextWriterFactory"/> 类的新实例。 /// </summary> /// <param name="logPathFactory">日志的路径生成工厂。</param> public StreamTextWriterFactory(ILogPathFactory logPathFactory) { if (logPathFactory == null) { throw new ArgumentNullException("logPathFactory"); } this.LogPathFactory = logPathFactory; this.LogFolder = GA.FullPath("Logs"); this.LogExtension = ".log"; this.Encoding = Encoding.UTF8; }