How to use java.util.logging in weblogic?

I have an application that has been ported from Glassfish to Weblogic, and it uses java.util.logging as its logging environment.

The only way I found the logs to work is to edit the logging.properties JVM file and restart the server. This solution is inconvenient and gives problems because the log is written to a different file than the standard for weblogic, so we have to look for too many files to enter the cluster environment. Also, for some reason this does not work on some Windows systems.

Is there a way to preserve standard java logging for writing messages to standard weblogic log files? I tried the instructions on this page , but it does not work either.

+5
source share
1 answer

WebLogic Server comes with a JDK logger that will collect log messages from the JDK framework and forward them to the WebLogic Server logging system.

Set the default logging level for new ServerLoggingHandler instances to logging.properties, and add ServerLoggingHandler to the handlers.

handlers = weblogic.logging.ServerLoggingHandler
weblogic.logging.ServerLoggingHandler.level = ALL

http://docs.oracle.com/cd/E14571_01/web.1111/e13739/logging_services.htm#CHDBBEIJ

To configure the JDK logging structure to use the logging.properties file, the standard System property java.util.logging.config.file is used. With WebLogic Server, this can be easily done by setting the JAVA_OPTIONS system property with the appropriate value.

$export JAVA_OPTIONS = "- Djava.util.logging.config.file =//xxx///wls1035/logging.properties"

: http://buttso.blogspot.de/2011/06/using-slf4j-with-weblogic-server.html

+5

All Articles