IBM Security Verify

 View Only
  • 1.  Runtime IDMappingExtUtils.traceString java.util.logging.Level.INFO log messages to console (stdout) for lightweight containers

    InnerCircle
    Posted Tue August 02, 2022 11:33 AM

    @Scott Exton @Leo Farrell

    We have a lot of uses of IDMappingExtUtils and we have our trace spec set to "com.tivoli.am.fim.trustserver.sts.utilities.IDMappingExtUtils=INFO".  We use this to record a lot of decisions that get made in our mapping rules, as well as errors and such.

    How can I get these to stdout for the new lightweight runtime container since we don't have the syslog forwarder to get them off the container now?  Has anything been introduced in v10.0.4.0 that may help with this, or do I need to put in an RFE?

    Thanks for your input!

    Matt

    ​​

    ------------------------------
    Matt Jenkins
    ------------------------------


  • 2.  RE: Runtime IDMappingExtUtils.traceString java.util.logging.Level.INFO log messages to console (stdout) for lightweight containers

    Posted Tue August 02, 2022 05:07 PM

    Matt,

     

    I suspect that these trace statements end up in trace.log and not messages.log.  We redirect the Liberty messages to the console, but I suspect that this does not include the trace statements.  So, I believe that an RFE will be required.

     

    Thanks.

     

     

    Scott A. Exton
    Senior Software Engineer
    Chief Programmer - IBM Security Verify Access

    IBM Master Inventor

    cid4122760825*<a href=image002.png@01D85F83.85516C50">

     

     

     






  • 3.  RE: Runtime IDMappingExtUtils.traceString java.util.logging.Level.INFO log messages to console (stdout) for lightweight containers

    InnerCircle
    Posted Tue August 02, 2022 05:19 PM
    I worried about that.  Is there a method to send something to the message log instead?  Thanks @Scott Exton!


    ------------------------------
    Matt Jenkins
    ------------------------------



  • 4.  RE: Runtime IDMappingExtUtils.traceString java.util.logging.Level.INFO log messages to console (stdout) for lightweight containers

    Posted Tue August 02, 2022 05:31 PM

    Matt,

     

    Unfortunately I am not an SME on the JavaScript rules, but I am sure that someone else who is monitoring this channel will know the answer to your question.  If something is sent to system.out of the Liberty server it should appear in the container console.

     

    Thanks.

     

     

    Scott A. Exton
    Senior Software Engineer
    Chief Programmer - IBM Security Verify Access

    IBM Master Inventor

    cid4122760825*<a href=image002.png@01D85F83.85516C50">

    Phone: 61-7-5552-4008
    E-mail: scotte@au1.ibm.com

    1 Corporate Court
    Bundall, QLD 4217
    Australia

     

     

     






  • 5.  RE: Runtime IDMappingExtUtils.traceString java.util.logging.Level.INFO log messages to console (stdout) for lightweight containers

    Posted Tue August 02, 2022 07:43 PM

    Hello Scott, Matt,

    Matt, one can print to the 'messages.log' with 'System.out.println()' in JavaScript mapping rules.

    You need to understand that this is going to increase the load on the disk since now for every transaction this will be written to the messages.log, so the recommendation is to use sparingly or to properly performance test to make sure that under high load you are able to keep up with the logging.



    ------------------------------
    JACK YARBOROUGH
    ------------------------------



  • 6.  RE: Runtime IDMappingExtUtils.traceString java.util.logging.Level.INFO log messages to console (stdout) for lightweight containers

    InnerCircle
    Posted Wed August 03, 2022 11:41 AM
    @JACK YARBOROUGH, great information, thank you!  Is there a performance difference between using System.out.println() versus IDMappingExtUtils.traceString and having the trace spec set to log if I am logging the same stuff?  In other words, I'm not adding any messages, I am just going to convert existing ones that were going to the trace log using the traceString method to go to the message log.  I wasn't sure if writing to the message log (or hopefully stdout in the lightweight containers) is more expensive computationally than the writing to the trace log.

    Thanks so much!  This is extremely helpful!​​

    ------------------------------
    Matt Jenkins
    ------------------------------



  • 7.  RE: Runtime IDMappingExtUtils.traceString java.util.logging.Level.INFO log messages to console (stdout) for lightweight containers

    InnerCircle
    Posted Wed August 10, 2022 06:06 PM
    @JACK YARBOROUGH Once I imported the System class, this worked great.  Luckily I had all my output calls using two helper functions I wrote, one for logging, one for tracing.  So all I had to do was update the helper logmsg() function I wrote to use System.out.println().  They are now going to standard output, which means to the container logs, and thanks to improvements in v10.0.4.0 in JSON format!  YEA DEVELOPERS!  THANK YOU!!!

    Matt

    ------------------------------
    Matt Jenkins
    ------------------------------