Skip to content

Commit

Permalink
Merge pull request #3218 from christophsturm/more-logging-fixes
Browse files Browse the repository at this point in the history
Only build string when its actually output
  • Loading branch information
ripcurlx authored Sep 6, 2019
2 parents 211eb1b + 1c8f869 commit 9bce77d
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@

import bisq.common.Timer;
import bisq.common.UserThread;
import bisq.common.app.Log;
import bisq.common.crypto.CryptoException;
import bisq.common.crypto.Hash;
import bisq.common.crypto.Sig;
Expand All @@ -58,9 +57,9 @@
import bisq.common.proto.persistable.PersistablePayload;
import bisq.common.proto.persistable.PersistedDataHost;
import bisq.common.storage.Storage;
import bisq.common.util.Hex;
import bisq.common.util.Tuple2;
import bisq.common.util.Utilities;
import bisq.common.util.Hex;

import com.google.protobuf.ByteString;

Expand All @@ -87,8 +86,6 @@
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;

import org.slf4j.LoggerFactory;

import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;
Expand Down Expand Up @@ -804,7 +801,7 @@ private Map<ByteArray, MapValue> getPurgedSequenceNumberMap(Map<ByteArray, MapVa
}

private void printData(String info) {
if (LoggerFactory.getLogger(Log.class).isInfoEnabled() || LoggerFactory.getLogger(Log.class).isDebugEnabled()) {
if (log.isTraceEnabled()) {
StringBuilder sb = new StringBuilder("\n\n------------------------------------------------------------\n");
sb.append("Data set ").append(info).append(" operation");
// We print the items sorted by hash with the payload class name and id
Expand Down

0 comments on commit 9bce77d

Please sign in to comment.