public FluentdSink(FluentdHandlerSettings settings) : base(settings.BatchPostingLimit, settings.BatchingPeriod)
 {
     this.settings             = settings;
     this.serializationContext = new SerializationContext(PackerCompatibilityOptions.PackBinaryAsRaw)
     {
         SerializationMethod = SerializationMethod.Map
     };
     this.visitor = new SerilogVisitor();
 }
示例#2
0
        public FluentdSink(FluentdHandlerSettings settings) : base(settings.BatchPostingLimit, settings.BatchingPeriod)
        {
            this.settings = settings;

            if (String.IsNullOrEmpty(this.settings.customer_token) || this.settings.customer_token.Length < 30)
            {
                throw new ArgumentException("Customer token property must be provided with a valid value!");
            }

            this.serializationContext = new SerializationContext(PackerCompatibilityOptions.PackBinaryAsRaw)
            {
                SerializationMethod = SerializationMethod.Map
            };
            this.visitor  = new SerilogVisitor();
            this.sourceIP = this.DetermineIP();
        }