log4j: Class name showing in log is not correct when I call the logger from another class
问题 Basically, when using log4j, I know we have to initiate a Logger by using Logger.getLogger(MyClass.class) or Logger.getLogger("MyClass"). I have too many classes and I dont want to add this statement in every class. Rather, what I woudl like to do is this Logger.info(this,"My message"); Where Logger is a class I have written (not the one in log4j) which in turn initiates an object of type Logger (org.apache.log4j.Logger) and carries on with the message. This is my Logger.java package com