Expose custom application logging on WebLogic in Log Analytics

Lucas Jellema
0 0
Read Time:1 Minute, 39 Second

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.

image

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.

image

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

image

Select the diagnostics log. Press Select.

A message is displayed:

image

Click on Save.

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

image

 

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:

image

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):

image

About Post Author

Lucas Jellema

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.
Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %
Next Post

Oracle 12c STIG Password Generator in PL/SQL

Creating or modifying an Oracle Database user password can be done by using any standard password generator you can find on the WEB. But I wanted a password to comply to “ora12c_strong_verify_function”, and this isn’t as easy to generate as you might expect. Though most generators provide options to include […]
%d bloggers like this: