Adding new loggers in Glassfish v3
Glassfish uses java util logging and below are two ways through which one can add new loggers for their application or third party api’s.
1. Set log-levels command
By executing the ‘asadmin set-log-levels org.springframework=FINE’ command a new logger for springframework is added. The logger gets added as soon as the command executes successfully.
2. Modifying the logging.properties
By modifying the logging.properties present in the domain/config folder as –
org.springframework.level=FINE.
The logger gets added as soon as the properties file is saved.
No glassfish server restarts are required in any of the above approaches. The log statements can be seen in the same old server.log file. The newly added logger is visible in the admin console under Configurations->server-config->Logger Settings->Log levels. Any further modifications to the log levels can be done through this admin console UI.
Posted on March 21, 2011, in glassfish and tagged glassfish, logging. Bookmark the permalink. Leave a comment.
Leave a comment
Comments 0