java - Log4j not send logs to linux SYSLOG -


i want implement log4j java project. put jar in lib folder , configure log4j.properties file. logs successfuly shows in console, can't see logs in syslog app (ksyslog) of kubuntu. properties file:

log4j.rootlogger=info, stdout, syslog, file  # redirect log messages console log4j.appender.stdout=org.apache.log4j.consoleappender log4j.appender.stdout.target=system.out log4j.appender.stdout.layout=org.apache.log4j.patternlayout log4j.appender.stdout.layout.conversionpattern=%d{yyyy-mm-dd hh:mm:ss} %-5p %c{1}:%l - %m%n  # redirect log messages syslog log4j.appender.syslog=org.apache.log4j.net.syslogappender log4j.appender.syslog.sysloghost=127.0.0.1 log4j.appender.syslog.layout=org.apache.log4j.patternlayout log4j.appender.syslog.layout.conversionpattern=%d{iso8601} %-5p [%t] %c{2} %x - %m%n log4j.appender.syslog.facility=local1  # redirect log messages log file, support file rolling. log4j.appender.file=org.apache.log4j.rollingfileappender log4j.appender.file.file=/var/log/  log4j-application.log log4j.appender.file.maxfilesize=5mb log4j.appender.file.maxbackupindex=10 log4j.appender.file.layout=org.apache.log4j.patternlayout log4j.appender.file.layout.conversionpattern=%d{yyyy-mm-dd hh:mm:ss} %-5p %c{1}:%l - %m%n 

what incorrect in properties file or incorrect?

i found solutin in thread writing log data syslog using log4j

we must add

$modload imudp $udpserverrun 514 

to rsyslog.conf , restart rsyslog


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -