예제 #1
0
        public void Enrich(LogEvent logEvent, ILogEventPropertyFactory propertyFactory)
        {
            var value    = LogValueResolver.Resolve(this);
            var property = new LogEventProperty("RequestPath", new ScalarValue(value));

            logEvent.AddOrUpdateProperty(property);
        }
        public void Enrich(LogEvent logEvent, ILogEventPropertyFactory propertyFactory)
        {
            var value = LogValueResolver.Resolve(this);

            if (value == default(string))
            {
                return;                           // don't set null values
            }
            var property = new LogEventProperty("MemberId", new ScalarValue(value));

            logEvent.AddOrUpdateProperty(property);
        }
        public void Enrich(LogEvent logEvent, ILogEventPropertyFactory propertyFactory)
        {
            var value = LogValueResolver.Resolve(this);

            if (!string.IsNullOrWhiteSpace(value))
            {
                var bytes = Convert.FromBase64String(value);
                var body  = Encoding.UTF8.GetString(bytes);

                var property = new LogEventProperty("RequestBody", new ScalarValue(body));
                logEvent.AddOrUpdateProperty(property);
            }
        }
        public void Enrich(LogEvent logEvent, ILogEventPropertyFactory propertyFactory)
        {
            var property = new LogEventProperty(Constants.RouteTemplateHeader, new ScalarValue(LogValueResolver.Resolve(this)));

            logEvent.AddOrUpdateProperty(property);
        }