Exemple #1
0
        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
            });
        }
Exemple #2
0
 public LugerLogger(BatchLogPoster batchPoster)
 {
     scopes           = new List <object>();
     this.batchPoster = batchPoster;
 }