Logging made easy in OAM 11g with this simple trick!



This post is part of a larger series on Oracle Access Manager 11g called Oracle Access Manager Academy. An index to the entire series with links to each of the separate posts is available.

Logging is extremely helpful when trying to troubleshoot issues and normally when you see instructions to log in OAM 11g there is documentation on using WLST commands with several steps or Enterprise Manager that can be used to set various log levels, but in both cases this can be a bit tedious.  Wouldn’t it be great if you could just update some file like in the old OAM 10g days using the oblog_config.xml or something similar; see  http://docs.oracle.com/cd/E12530_01/oam.1014/b32419/log.htm.  Well I am going to give you a little known trick that can provide you this very thing.  Welcome to updating the logging.xml file and it does this in real time without any restarts needed to add or remove logging!!  Read on….

How to Configure Logging using a simple XML file.

There is a little known secret where you can update the logging.xml file.  The following steps will show you how to add logging that is persistent even if you restart the managed server.  NOTE: Now in or later in Enterprise Manager there is an option to make logging persistent by using a check box.


  1. 1. Go to $IAM_DOMAIN/config/fmwconfig/servers/<ServerName>/; where <ServerName> is the server name to change logging like oam_server1.

  3. 2. Make a backup of logging.xml

  5. 3. Edit logging.xml

  7. 4. Search  for “loggers”, you should find the first line below <logger name=” level=’WARNING:1′>.

  9. 5. You can add one or more lines as needed above <logger name=” level=’WARNING:1′> as follows; below are a couple examples showing two loggers.
    <logger name=’oracle.oam.user.identity.provider’ level=’TRACE:16’/>
    <logger name=’oracle.ods.virtualization’ level=’TRACE:16’/>

  11. 6. NO RESTART — Once you save the change logging should start after a few seconds.

  13. 7. Follow this link to learn more details on various modules you can use in the logging.xml file http://docs.oracle.com/cd/E40329_01/admin.1112/e27239/logging.htm#CHDIBAHF.

  15. 8. To stop the logging simply remove the lines that were added from the logging.xml and save, or revert the logging.xml backup file.

The key is adding the proper module to the name=’<MODULE>‘ value and the logging level=’<LEVEL>‘ for the logging level where <MODULE> is something like oracle.ods.virtualization and <LEVEL> is the logging level like TRACE:16; note TRACE:32 may also been required to get more fine grain detail depending on the problem you are troubleshooting.  Be careful when updating the logging.xml file for formatting and using the correct loggers.  To be safe use the examples I give as a template along with finding the right module to log.  If you do not feel comfortable doing this I would highly recommend using Enterprise Manager because there is no room for error.


This trick may not be for everyone.  For example in a production environment there may be security lock downs for good reason to prevent updating or even accessing certain files, so Enterprise Manager still may be the best choice.  However for those that may be working in a non-production environment that have access to this configuration file, this trick may be your very best friend.  Happy logging!!

Add Your Comment