0

I am using log4j to get all logger information and in log4j.xml, I given web.log and logs are getting printed in this file.

But I want to create a different log file based on session id and logged in username for every user logged in.

Please let me know how can I do this job?

ZhaoGang
  • 4,491
  • 1
  • 27
  • 39
  • https://stackoverflow.com/q/1239227/1531971 –  Feb 19 '19 at 19:00
  • You will need to add appenders in code and then use them to log to the proper logfile. See https://stackoverflow.com/a/9003191/10455672 which describes the exact same problem. – Gerben Jongerius Feb 20 '19 at 07:17
  • thanks for replay @GerbenJongerius please provide any example i can understand how it exactly works – Manu kumar Feb 20 '19 at 17:04

0 Answers0