tephra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From poornachandra <...@git.apache.org>
Subject [GitHub] incubator-tephra pull request #74: TEPHRA-266 Identify log messages when mul...
Date Mon, 30 Apr 2018 18:34:09 GMT
Github user poornachandra commented on a diff in the pull request:

    https://github.com/apache/incubator-tephra/pull/74#discussion_r185070466
  
    --- Diff: tephra-core/src/main/java/org/apache/tephra/coprocessor/TransactionStateCache.java
---
    @@ -184,4 +185,14 @@ private void refreshState() throws IOException {
       public TransactionVisibilityState getLatestState() {
         return latestState;
       }
    +
    +  protected void setId(@Nullable String id) {
    +    if (id != null) {
    +      this.logPrefix = "[" + id + "] ";
    +    }
    +  }
    +
    +  private String prefixLog(String message) {
    --- End diff --
    
    HBase co-processor uses Apache commons-logging. The `{}` notation is not available in
the commons-logging APIs.
    
    I couldn't figure out a way to not create a string unless absolutely necessary. The only
debug log in that file has `LOG.isDebugEnabled()` guard. However, I know this is not an ideal
solution.


---

Mime
View raw message