Posted on

How to set Glassfish Log levels from command line

To List the Logger Levels

asadmin>list-log-levels

To Set the Global Log Level

You configure global logging by editing the logging.properties file. The default logging.properties file is located in the same directory as the domain.xml file, typically domain-dir/config. You can choose a different file name by using thejava.util.logging.config.file system property to specify a file name. For example:

java -Djava.util.logging.config.file=myfile
The ConsoleHandler has a separate log level setting that limits the messages that are displayed. For example:

java.util.logging.ConsoleHandler.level = INFO 
java.util.logging.ConsoleHandler.formatter =
com.sun.enterprise.server.logging.UniformLogFormatter


Changing the Global Log Level for All Loggers


If you set the log level at the root level, you are setting the level of all loggers. This example sets the log level for all loggers to INFO:

.level= INFO
Leave a Reply

Your email address will not be published. Required fields are marked *