views:

43

answers:

1

I am used to using Tomcat/Log4J for my logging. My current project is deployed to Glassfish v3 and I'm finding the logging set up to be painful. Searching has shown me I'm not the only one with frustrations.

I was able to get Log4J logging to a separate log file defined in my log4j.properties file. However, I would like to only have to view one log file. I am using SLF4J with the slf4j-jdk14 implementation and been able to get the log statements in the server.log file.

I would like to change the log levels for my classes but can't figure out how to do it in Glassfish/JUL. The Glassfish wiki (http://wiki.glassfish.java.net/Wiki.jsp?page=FaqConfigureLogging) states:

The primary interface for configuring Glassfish logging is the Application Server -> Logging tab in the admin console.... Of special note here is the Properties section at the bottom of the page. These can be used to fine tune logging and, especially, change the logging levels of your own classes. If you use the java.util.logging system in your own application, then you can add properties here to affect your loggers directly.

Problem is there is no "Properties" section at the bottom of the page. How do you change the logging levels in v3?

EDIT: I should have clarified that I found the Configuraton -> Logger Settings page in the admin tool. However, it does not have a "Properties" section displayed. Perhaps this was removed in v3?

A: 

For v3 it is under Configuration->Logger Settings. (You may also need to add your logger to /yourdomain_folder/config/logging.properties file)

a1ex07
Thanks, by adding the package to the properties file directly it is now viewable/editable in the UI. Seems a little stupid to have to do it that way, but at least its doable.
sdoca