Considering what is stated in apache common logging documentation:
The commons-logging.jar file includes the JCL API, the default LogFactory implementation and thin-wrapper Log implementations for Log4J, Avalon LogKit, the Avalon Framework's logging infrastructure, JDK 1.4, as well as an implementation of JDK 1.4 logging APIs (JSR-47) for pre-1.4 systems.
In most cases, including commons-logging.jar and your preferred logging implementation in the classpath should be all that is required to use JCL.
you probably do not need to change anything, because generated classes should youse log4j through common logging interface. If you need do use log4j classes directly, then there is a workaround for that, which includes:
- Copying dao/daohome.ftl template from hibernate-tools.jar to ${externalfolder}
- Change it to your needs
- Configure template location property for exporter in Hibernate Coge Generatiion Configuration dialog and point it to ${externalfolder} which contans dao/daohome.ftl file in it