I have a web application and would like to log to different files depending on which web service gets called.
So WS1 will log to WS1_log.txt for example, while WS2 will log to WS2_log.txt.
Is this possible?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes you can do that. Create two (rolling) file appenders in your configuration and then configure your loggers like this:
This requires that you create a logger per webservice like this: