I am just working with Glassfish 3.2 and wanted to integrate log4j logging, so I can see Logger outputs in my normal server.log
- First I downloaded a log4j jar.
- Then I copied this jar file into my Glassfish /lib directory.
- Then I created a log4j.properties file and put it into the /config directory of my domain (e.g. GLASSFISH_HOME/domains/domain1/config/)
- After that I added a JVM option to reference the new properties file (Configurations > server-config > JVM settings > JVM Options > Add JVM option)
- Then saving the settings and
- restarting the Glassfish server