Re: Log4j:How can i apply logging mechanism to particular packages
Posted By:
Christopher_Koenigsberg
Posted On:
Saturday, April 29, 2006 03:22 PM
In my classes I usually say "Logger logger = Logger.getLogger(myClass.class)" and this means it will use a Logger that has the same name as the fully-qualified name (including package prefix) of the class.
Then in the log4j.properties or log4j.xml you can change the level of particular loggers, or assign them to different Appenders, etc. by using the package names.