flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From StephanEwen <...@git.apache.org>
Subject [GitHub] flink pull request #5594: [FLINK-8800][REST] Reduce logging of all requests ...
Date Wed, 28 Feb 2018 10:12:25 GMT
Github user StephanEwen commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5594#discussion_r171196255
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/rest/AbstractHandler.java
---
    @@ -84,8 +84,8 @@ protected AbstractHandler(
     
     	@Override
     	protected void respondAsLeader(ChannelHandlerContext ctx, Routed routed, T gateway)
throws Exception {
    -		if (log.isDebugEnabled()) {
    -			log.debug("Received request " + routed.request().getUri() + '.');
    +		if (log.isTraceEnabled()) {
    --- End diff --
    
    Does `routed.request().getUri()` perform some decoding work? If not, why not simply use
    ```java
    log.trace("Received request {}.", routed.request().getUri());
    ```
    which should be very efficient (no object creation, string concatenation, etc). Results
even in less byte code.


---

Mime
View raw message