[
https://issues.apache.org/jira/browse/SYNAPSE-220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12557247#action_12557247
]
Asankha C. Perera commented on SYNAPSE-220:
-------------------------------------------
Vesa
I do not agree the address printed in the logs is wrong, as it prints the
'hostname' or the 'ip' of the host server (and not the virtual address being
used by the http transport it hosts). We do this by setting the IP and hostname
to the Log4J MDC as follows:
InetAddress addr = InetAddress.getLocalHost();
if (addr != null) {
// Get IP Address
String ipAddr = addr.getHostAddress();
if (ipAddr != null) {
MDC.put("ip", ipAddr);
}
// Get hostname
String hostname = addr.getHostName();
if (hostname == null) {
hostname = ipAddr;
}
MDC.put("host", hostname);
> Synapse doesn't support virtual hosting
> ---------------------------------------
>
> Key: SYNAPSE-220
> URL: https://issues.apache.org/jira/browse/SYNAPSE-220
> Project: Synapse
> Issue Type: Improvement
> Components: Core
> Affects Versions: 1.1
> Reporter: Vesa Varimo
> Assignee: Asankha C. Perera
> Fix For: 1.1.1-QA-B3
>
>
> I have environment which has multiple virtual network interfaces.
> I'm unable to specify the ip address that I'm willing to use for Synapse.
> It would be great to have this feature implemented.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]