public MLogLoggerProvider(IOptions <MLogLoggerOptions> options) { _options = options.Value; if (string.IsNullOrEmpty(_options.Url?.AbsoluteUri) || _options.Certificate == null) { throw new ArgumentException("MLog Url or Certificate are missing.", nameof(options)); } _mlogClient = new MLogClient(_options.Url, _options.Certificate, false); _messageProcessor = new MLogMessageProcessor(_mlogClient, _options.ErrorLogger); }
public MLogLogger(string name, MLogLoggerOptions options, MLogMessageProcessor messageProcessor) { _name = name; _options = options; _messageProcessor = messageProcessor; }