I deployed a single app on my Jboss Server and configured 2 log handlers for a single logger. This app runs through JUnitEEServlet and it is a simple set of Selenium Test cases.
The issue here is that my logger creates the y.log file and each single test case logs everything into this file. I would like to make my logger to log into different files named similarly to my test cases. i.e. if I run TC1 I want TC1.log file to be created, if I run TC2 I want TC2.log file to be created, and so on. Also each time I run TC1 I want the new log entries to be logged in the same TC1.log file, etc.
I know that the logger category might help. I know that if I write the package name where my TC classes are located I can make all of them to log using the same logger. Would it also work if I append the class name so the logger applies to that single class?? (i.e. com.blah.blah.bla.testcases.tc1) But if this works, I will need to crate a single logger and it's appender for each single test case so each of them log to their own file, right?
Is there a way to configure the logger or the handler similar to a variable so each single test case sets it with its category or its filename to log into??