public LugerLogProvider(LugerLogOptions config) { if (config.LugerUrl is null) { throw new ArgumentNullException($"{nameof(LugerLogOptions)}.{nameof(LugerLogOptions.LugerUrl)} is null"); } if (config.Bucket is null) { throw new ArgumentNullException($"{nameof(LugerLogOptions)}.{nameof(LugerLogOptions.Bucket)} is null"); } this.config = config; clientHandler = new HttpClientHandler { MaxConnectionsPerServer = config.MaxConnectionsPerServer, Proxy = config.Proxy, UseProxy = config.UseProxy }; batchPoster = new BatchLogPoster(config, new HttpClient(clientHandler) { BaseAddress = config.LugerUrl }); }
public LugerLogger(BatchLogPoster batchPoster) { scopes = new List <object>(); this.batchPoster = batchPoster; }