logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tehale <ankushtehale.v...@gmail.com>
Subject LoggerFields with RFC 5424 with in log4j.properties files.
Date Mon, 03 Jul 2017 19:18:30 GMT

I am trying to add syslog appender to standard elasticsearch-5x
log4j2.properties file but it's not sending priority of log message over TCP
with log4j2 syslogappender in RFC 5424 format.

I have tried adding LoggerFields into my syslog appender in properties file
but it not paying off. I see examples with log4j.xml but no example with
log4j.properties for LoggerFields.

Here is my appender:
appender.sumo_syslog.type = Syslog
appender.sumo_syslog.name = sumo_syslog
#appender.sumo_syslog.layout.type = PatternLayout
#appender.sumo_syslog.layout.pattern = %-5p %-25c{1.} %marker%m%n
#appender.sumo_syslog.loggerFields.keyValuePairs=[{"key" : "priority",
"value" : "%p"}]
appender.sumo_syslog.loggerFields={"key" : "priority", "value" : "%p"}
appender.sumo_syslog.port = 514
appender.sumo_syslog.host = localhost
appender.sumo_syslog.facility = local6
appender.sumo_syslog.protocol = UDP
appender.sumo_syslog.format = RFC5424
appender.sumo_syslog.charset = UTF-8

Also opened this on 

Please help.

View this message in context: http://apache-logging.6191.n7.nabble.com/LoggerFields-with-RFC-5424-with-in-log4j-properties-files-tp75856.html
Sent from the Log4j - Users mailing list archive at Nabble.com.

To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message