This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
// THIS IS FOR ClIENT log4j.logger.com.ls.es.service=DEBUG, file1 // THIS IS FOR SUPPORT log4j.logger.com.ls.es.service=DEBUG, file2 // THIS IS ERROR MESSAGE log4j.logger.com.ls.es.service=ERROR, file3
Here file1 is for Client(Client Admin)and file2 is for Support.
but am getting only file3.log file which is for Error Message.. some where configuration is missing...
I dont think it possible to set more than one level to one logger(in your case, you are trying to set com.foo.bar package to DEBUG and ERROR levels). In your case, the com.foo.bar package will be set to ERROR level. Also, instead of:
// THIS IS FOR ClIENT log4j.logger.com.ls.es.service=DEBUG, file1 // THIS IS FOR SUPPORT log4j.logger.com.ls.es.service=DEBUG, file2
You can do:
But if you specify
then it will override the above DEBUG settings and you wont get any DEBUG messages
I am not very sure about the requirement .If its like you want to have logs to be logged in two files then create 2 rolling file appender with different files and then add the appender to the logger.It possible in log4j to have 2 appenders for the same logger.Even with different set of appended properties. It this your question ? Hope this helps.