예제 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GrayLogHttpTlsClient" /> class.
 /// </summary>
 /// <param name="facility">Facility to set on all sent messages.</param>
 /// <param name="host">GrayLog host name.</param>
 /// <param name="port">GrayLog HTTP port.</param>
 /// <param name="useSsl">Whether to use SSL (not supported by GrayLog at this time).</param>
 /// <param name="useCompression">if set to <c>true</c> [use compression].</param>
 /// <param name="clientCertificatePath">The client certificate path.</param>
 /// <param name="clientCertificatePassword">The client certificate password.</param>
 public GrayLogHttpTlsClient(string facility, string host, int port = 12201, bool useSsl = false, bool useCompression = true, string clientCertificatePath = null, string clientCertificatePassword = null)
     : base(facility)
 {
     this.configuration = new GraylogConfiguration
     {
         Facility                  = facility,
         Host                      = host,
         Port                      = port,
         UseSsl                    = useSsl,
         UseCompression            = useCompression,
         ClientCertificatePath     = clientCertificatePath,
         ClientCertificatePassword = clientCertificatePassword,
         RequestTimeout            = 120
     };
 }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GrayLogHttpTlsClient" /> class.
 /// </summary>
 /// <param name="configuration">The configuration.</param>
 public GrayLogHttpTlsClient(GraylogConfiguration configuration)
     : base(configuration.Facility)
 {
     configuration.ThrowIfNull(nameof(configuration));
     this.configuration = configuration;
 }