MCPcopy Index your code
hub / github.com/OpenTSDB/opentsdb / logChannel

Method logChannel

src/tsd/AbstractHttpQuery.java:497–512  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

495 }
496
497 protected final String logChannel() {
498 if (request.headers().contains("X-Forwarded-For")) {
499 String inetAddress;
500 String proxyChain = request.headers().get("X-Forwarded-For");
501 int firstComma = proxyChain.indexOf(',');
502 if (firstComma != -1) {
503 inetAddress = proxyChain.substring(0, proxyChain.indexOf(','));
504 } else {
505 inetAddress = proxyChain;
506 }
507 return "[id: 0x" + Integer.toHexString(chan.hashCode())
508 + ", /" + inetAddress + " => " + chan.getLocalAddress() + ']';
509 } else {
510 return chan.toString();
511 }
512 }
513
514 protected final void logInfo(final String msg) {
515 if (logger().isInfoEnabled()) {

Callers 3

logInfoMethod · 0.95
logWarnMethod · 0.95
logErrorMethod · 0.95

Calls 4

containsMethod · 0.80
getMethod · 0.45
hashCodeMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected