Layer7 API Management

Expand all | Collapse all

Logging customize error response

  • 1.  Logging customize error response

    Posted 03-07-2019 03:59 AM

    I am trying to log few request and response parameters for debug purpose. I guess Global policy fragments with message-completed state is the best/suitable approach for that. But response status code and few context variables are not logged whenever customize error response executes. I need to log response status code for all transactions. can you help me? Also i believe Global policy fragments are asynchronous in nature, if not i have to do the logging asynchronously so not to increase transaction time. what is the best way to do that?



  • 2.  Re: Logging customize error response

    Posted 03-08-2019 06:11 PM

    Good afternoon,

     

    The global policies are not asynchronous as they run prior to the service being resolved and then after the service policy has executed. If you are looking for an asynchronous method you can look to use Custom Audit Sink Policy with some logic that looks for a trigger like debug in a variable of the policy. If you still want to do it inline of the policy we have seen some customers have in the main policy a static audit detail writing to the logs with all the important information.

     

    Sincerely,

     

    Stephen Hughes

    Broadcom Support