Hi Isuru,

Yes. This needs to be configured in out path, (OutSequence) after sending
the request to the Back-end service.

On Fri, Jan 9, 2015 at 7:13 PM, Isuru Udana <[email protected]> wrote:

> Hi Malaka,
>
> On Fri, Jan 9, 2015 at 6:06 PM, Malaka Silva <[email protected]> wrote:
>
>> Hi,
>>
>> You can get the used endpoint using following configuration.
>>
>>          <script language="js">
>>              var endpoint = mc.getProperty('last_endpoint');
>>              mc.setProperty('used_endpoint',endpoint.toString());
>>          </script>
>>
>          <log level="custom">
>>             <property name="Endpoint"
>> expression="get-property('used_endpoint')"/>
>>          </log>
>>
> This has to be done at the outSequence. isn't it ? We can only log the
> child endpoint name which the request is sent, when the response is
> received.
>
>>
>> On Fri, Jan 9, 2015 at 3:39 PM, Bhathiya Jayasekara <[email protected]>
>> wrote:
>>
>>> Hi Alessio,
>>>
>>> On Mon, Jan 5, 2015 at 9:51 PM, Aliosha <[email protected]> wrote:
>>>
>>>> i'm using WSO2 ESB 4.8.1.
>>>>
>>>> In my usecase i use a proxy (MyProxy) sending each request towards a
>>>> loadbalanced endpoint. Inside the loadBalanced endpoint there are 3
>>>> endpoints (E1, E2, E3) and the balancing algorithm is the standard "round
>>>> robin". In this structure i need to log exactly:
>>>>
>>>> 1) Who is sendig the request (the client IP for example)
>>>>
>>>  <log level="custom">
>>>       <property name="Client IP"
>>> expression="get-property('axis2','REMOTE_ADDR')"/>
>>>  </log>
>>>
>>>
>>>> 2) the payload of the request (maybe i can obtain this setting the log
>>>> level = full)
>>>>
>>> Yes, you can use <log level="full"/>
>>>
>>>
>>>> 3) which of the 3 endpoints the request is sent to (E1, E2 or E3 ?)
>>>>
>>> I don't think you can achieve this using log mediator. As a workaround,
>>> if you enable DEBUG logs for your Endpoints (HTTPEndpoint, AddressEndpoint
>>> etc.), you can see to which endpoint each request is sent.
>>>
>>> Thanks,
>>> Bhathiya
>>>
>>>
>>>> How can i achieve this? thanx
>>>>
>>>
>>>
>>>
>>> --
>>> *Bhathiya Jayasekara*
>>> *Software Engineer,*
>>> *WSO2 inc., http://wso2.com <http://wso2.com>*
>>>
>>> *Phone: +94715478185 <%2B94715478185>*
>>> *LinkedIn: http://www.linkedin.com/in/bhathiyaj
>>> <http://www.linkedin.com/in/bhathiyaj>*
>>> *Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>*
>>> *Blog: http://movingaheadblog.blogspot.com
>>> <http://movingaheadblog.blogspot.com/>*
>>>
>>
>>
>>
>> --
>>
>> Best Regards,
>>
>> Malaka Silva
>> Senior Tech Lead
>> M: +94 777 219 791
>> Tel : 94 11 214 5345
>> Fax :94 11 2145300
>> Skype : malaka.sampath.silva
>> LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
>> Blog : http://mrmalakasilva.blogspot.com/
>>
>> WSO2, Inc.
>> lean . enterprise . middleware
>> http://www.wso2.com/
>> http://www.wso2.com/about/team/malaka-silva/
>> <http://wso2.com/about/team/malaka-silva/>
>>
>> Save a tree -Conserve nature & Save the world for your future. Print this
>> email only if it is absolutely necessary.
>>
>
>
>
> --
> *Isuru Udana*
> Senior
> *Software Engineer*
> WSO2 Inc.; http://wso2.com
> email: [email protected] cell: +94 77 3791887
> blog: http://mytecheye.blogspot.com/
> twitter: http://twitter.com/isudana
>



-- 

Best Regards,

Malaka Silva
Senior Tech Lead
M: +94 777 219 791
Tel : 94 11 214 5345
Fax :94 11 2145300
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
Blog : http://mrmalakasilva.blogspot.com/

WSO2, Inc.
lean . enterprise . middleware
http://www.wso2.com/
http://www.wso2.com/about/team/malaka-silva/
<http://wso2.com/about/team/malaka-silva/>

Save a tree -Conserve nature & Save the world for your future. Print this
email only if it is absolutely necessary.
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to