示例#1
0
 public FileLoggerBuilder(
     LoggingMessageTemplate messageTemplate, WriteToFilesConfig writeToFiles, IConfiguration configuration)
 {
     _messageTemplate = messageTemplate;
     _writeToFiles    = writeToFiles;
     _configuration   = configuration;
 }
        public ApplicationLoggerBuilder(IConfiguration configuration, IHostEnvironment environment)
        {
            _messageTemplate = new LoggingMessageTemplate(configuration);

            _elkLoggerBuilder = new ElkLoggerBuilder(new ElasticSearchConfig(configuration, environment));

            _fileLoggerBuilder = new FileLoggerBuilder(
                messageTemplate: _messageTemplate,
                writeToFiles: new WriteToFilesConfig(configuration),
                configuration: configuration);
        }