My requirement is , two classes must each have a log file. The two classes are in the same package. I am using log4j for implementing this. Below is the log4j.properties. Two log files are created when either of the class is executed. Any suggestions would be helpful. Thanks in advance
What i think, Nila has two classes in the same package.
Both claases have some log statements and also their respective appender.
That to log the both classes, each class has their own fileappender.
For example let two classes A and B.
The two file appeneder configured in log4j.properties are logfile and Importslogfile .
Suppose logfile is for class A and Importslogfile for class B.
Now if we execute the class A only, it will log into logfile that is CFlogs.log.
We did not executed class B. But still Importslogfile will get initiated and corresponding ItF.log of 0kb (zero kb)
gets created. And this is the question of Nila, that is there any to avoid creation of ItF.log until we execute the class B.