I read some articles about how to use log4j. Most of them give below code as a beginning:
Logger logger = Logger.getLogger("com.foo.Bar");
or
Logger logger = Logger.getLogger(XXX.class);
This will initialize the logger object.But my question is why need send the class type as a parameter? It seems when I use the logger, I don't care in which class I use it.So the Class type seems no effect to logger. If I declare a logger as static and public, I can call this logger at another class, So what's the intention of the author to design it like this? Will the Class type bind something when I use the logger? Or I can send any Class types to the getLogger function.