java - log4j appender isn't outputting anything -
i'm trying split messages separate log files. worked fine when had 2 (file , alarmsappender, i've added 3rd, messagesappender, i'm not getting output or log messages, while i'm still getting alarms_logger msgs , default msgs. here's log4j.config
# set root logger level debug , appender a1. log4j.rootlogger=info, file, stdout #alarmslogger log4j.logger.alarms_logger=info, alarmsappender log4j.additivity.alarms_logger = false #messageslogger log4j.logger.messages_logger=info, messagesappender log4j.additivity.messages_logger = false #alarms appender log4j.appender.alarmsappender=org.apache.log4j.fileappender log4j.appender.alarmsappender.file=/var/log/pmd_broker_alarms.log log4j.appender.alarmsappender.maxfilesize=10mb log4j.appender.alarmsappender.maxbackupindex=10 log4j.appender.alarmsappender.layout=org.apache.log4j.patternlayout log4j.appender.alarmsappender.layout.conversionpattern=%d{yyyy-mm-dd hh:mm:ss} %-5p %c{1}:%l - %m%n #messages appender log4s.appender.messagesappender=org.apache.log4j.fileappender log4j.appender.messagesappender.file=/var/log/pmd_broker_messages.log log4j.appender.messagesappender.maxfilesize=10mb log4j.appender.messagesappender.maxbackupindex=10 log4j.appender.messagesappender.layout=org.apache.log4j.patternlayout log4j.appender.messagesappender.layout.conversionpattern=%d{yyyy-mm-dd hh:mm:ss} %-5p %c{1}:%l - %m%n # a1 set consoleappender. 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 # file appender log4j.appender.file=org.apache.log4j.rollingfileappender log4j.appender.file.file=/var/log/pmd_broker.log log4j.appender.file.maxfilesize=10mb 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
in java i've got:
final static logger logger = logger.getlogger("messages_logger");
Comments
Post a Comment