예제 #1
0
        private SupportFileWriter(FileWriterConfiguration config)
            : base(LogLevel.Trace)
        {
            Contract.Requires(config != null);

            _encoding    = config.Encoding;
            _rawTemplate = config.Template;
            _fileName    = config.FileNameTemplate;

            SetConverterFactory(ConverterFactory.Default);
        }
예제 #2
0
        public FileWriter(FileWriterConfiguration config)
            : base(config.Level)
        {
            Contract.Requires(config != null);

            _logLevel         = config.Level;
            _encoding         = config.Encoding;
            _rawTemplate      = config.Template;
            _isNeedFileRotate = config.IsNeedFileRotate;
            _rawFilename      = config.FileNameTemplate;

            _filePool = new FileWriterFilePool(TimeSpan.FromMinutes(10), config.Encoding);
            SetConverterFactory(ConverterFactory.Default);
        }