{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Adapter for Envoy
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • 日本語コミュニティ
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Edge/API Management /
avatar image
0
Question by paulmartin · Feb 24, 2016 at 09:51 PM · 588 Views message logging policy

MessageLogging to Loggly

I am trying to use MessageLogging policy to Loggly. If I log response.content in the proxy PostFlow it works, but if I put the policy in the proxy PostClientFlow the response.content isn't available. Please help.

Thanks

Paul

@Mike Ison

Comment
Add comment
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Close

3 Answers

  • Sort: 
avatar image
3
Best Answer

Answer by Anil Sagar @ Google   · Feb 25, 2016 at 05:33 AM

@paulmartin ,

Good catch & Thank you for reporting same. I can able to reproduce issue. Seems like a bug.

Till the time issue is fixed, You can use a work around by setting up a custom variable using javascript & using same while message logging. I have verified same & it works.

In Javascript Policy, Post Flow Response,

 context.setVariable('logResponse', context.getVariable("message.content"))

Message logging policy, In Post Client Flow Response

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MessageLogging name="LogToSyslog">
    <Syslog>
        <Message>[XXXXXXXXXXX@41058 tag="{organization.name}.{apiproxy.name}.{environment.name}"] Weather request for WOEID  {logResponse}.</Message>
        <Host>logs-01.loggly.com</Host>
        <Port>514</Port>
        <Protocol>TCP</Protocol>
    </Syslog>
</MessageLogging>

Results,

We will keep you posted on fix, till the time please use above workaround. Keep us posted if you have any queries.


screen-shot-2016-02-25-at-110059-am.png (97.4 kB)
screen-shot-2016-02-25-at-110126-am.png (347.6 kB)
Comment
Add comment Show 2 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image paulmartin · Feb 25, 2016 at 12:40 PM 0
Link

Thanks for the work around

avatar image soujanyaedunuri · Nov 09, 2017 at 11:51 PM 0
Link
@Anil Sagar

Do we know by when the above issue ( message.content being blank in PostClientFlow) will be fixed? we are using On premise version.

avatar image
0
Best Answer

Answer by paulmartin · Feb 25, 2016 at 01:57 PM

Your work around worked with the caveat that I had to place the following property in the HTTPTargetConnections or else 400 and 500 errors will enter the error flow and the logResponse variable won't be set.

<Properties>

<Property name="success.codes">1xx,2xx,3xx,4xx,5xx</Property>

</Properties>

Comment
Add comment Show 2 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Anil Sagar @ Google ♦♦   · Feb 25, 2016 at 02:21 PM 0
Link

@paulmartin , We can improve above solution using fault rules instead of changing success criteria which will affect analytics reports.

Execute same Javascript using default fault rule in target end point to set logResponse variable.

    <DefaultFaultRule name="fault-rule">
        <Step>
            <Name>JavaScript-3</Name>
        </Step>
    </DefaultFaultRule>

screen-shot-2016-02-25-at-75058-pm.png (144.5 kB)
avatar image paulmartin Anil Sagar @ Google ♦♦ · Feb 25, 2016 at 02:55 PM 0
Link

I like this approach better. Thanks for the improvement.

avatar image
0

Answer by Karl Sponholz · Aug 01, 2018 at 05:24 PM

For me this doesn't work.

,

Hi, for me this doesn't work. Has something changed ?

Comment
Add comment · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Follow this Question

Answers Answers and Comments

29 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to access Message Processor machines to check logs 4 Answers

How to customise file name in Post client flow in Message logging policy. 1 Answer

Is there any efficient way to identify list of skipped policies for logging purpose ? 3 Answers

Flow variables not available in Post Client flow 2 Answers

Log time taken of all policies in a proxy endpoint 1 Answer

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2021 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Adapter for Envoy
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • 日本語コミュニティ
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Badges