Expose custom application logging on WebLogic in Log Analytics


Custom applications – standard Java EE, ADF or other Fusion Middleware such as SOA Suite – on WebLogic can produce logging through the WebLogic Diagnostics Framework (WLDF). Simply put: write log messages using Logger classes similar to standard Java Log and Log4J – read this article by my colleague Aino Andriessen for some details: https://technology.amis.nl/2011/01/12/oracle-diagnostics-logging-odl-for-application-development/ and this three part series by Duncan Mills: https://blogs.oracle.com/groundside/entry/adventures_in_adf_logging_part .

The default configuration of WebLogic Servers is such that logging produced by applications through the Loggers as described above is written to the diagnostics log file for the managed server. And this file is not by default included in the log file associations for the WebLogic Domain entity in Log Analytics.

In order to harvest custom application logging into Log Analytics, an association needs to be created for the diagnostics file. Let me show you how to do that.

Click on Configuration in Log Analytics page. The overview is shown of all Log Sources and Entities.


Click on WebLogic Servers. Click on node for the WebLogic Server for which you want to start harvesting diagnostic logging.

The current associations for the node are listed.


Click onĀ  Add to create a new Association. The popup shows a list of know log files for which an association can be added:


Select the diagnostics log. Press Select.

A message is displayed:


Click on Save.

After a little while, the agent on the WebLogic Host has been updated and one additional associated log source is indicated:



Provided the Log Levels have been configured appropriately for the custom application loggers (see this blog article about setting these levels) – we will now be able to see custom application logging in Log Analytics.

Given this application code:


We will have log messages from this application in the Standard Out log source (not a good practice) and in the Diagnostics file (fine practice):


About Author

Lucas Jellema, active in IT (and with Oracle) since 1994. Oracle ACE Director and Oracle Developer Champion. Solution architect and developer on diverse areas including SQL, JavaScript, Kubernetes & Docker, Machine Learning, Java, SOA and microservices, events in various shapes and forms and many other things. Author of the Oracle Press book Oracle SOA Suite 12c Handbook. Frequent presenter on user groups and community events and conferences such as JavaOne, Oracle Code, CodeOne, NLJUG JFall and Oracle OpenWorld.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.