Debugging OSGi bundle loading
## ## ## Use this to see only the OSGi bundle debugging information ## Use DEBUG to see nuxeo bundles as well (lots more output) ## Use WARN to see only webengine OSGi related messages ## #log4j.logger.nuxeo.bundle.debug=INFO
You'll want to uncomment the last line and choose your log level for this special logger appropriately. If you are new to OSGi, you may find the debug level interesting to walk through so you can see how nuxeo starts up. Most people who are working on their own extensions will probably want to use INFO or even WARN. Also, you can turn off all the other logging information. Unfortunately, glassfish uses "sun" logging and nuxeo uses "apache" logging so you have to change two files. The sun logging configuration is now in nxserver/app/config/logging.properties:
java.util.logging.ConsoleHandler.level = WARNING #com.sun.enterprise.server.logging.FileandSyslogHandler.file=logs/server.log com.sun.enterprise.server.logging.FileandSyslogHandler.level = WARNING
In this sample, I've set the log level to "WARNING" so that under most circumstances you'll get nothing from glassfish. You can do the same at the top of the log4j.properties file--the same one mentioned above--and changing the root logger level. Here is a snippet:
# Set root logger level to DEBUG and its only appender to CONSOLE. #log4j.rootLogger=INFO, CONSOLE, DEBUG log4j.rootLogger=WARN, FILE, CONSOLE
Note that apache loggers use "WARN" as the log level, yet "WARNING" is used by sun. Similarly, "ERROR" is used by apache and "SEVERE" by sun.
Hope this helps folks debug problems faster with their user-developed bundles. If you have any questions, just drop me a line at ismith [at] nuxeo.com
Subscribe to Feed
Follow us on Twitter

