ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [22/26] ignite git commit: ignite-4167 Do not log cache key/values
Date Thu, 05 Jan 2017 08:58:25 GMT
ignite-4167 Do not log cache key/values


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/9273e51c
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/9273e51c
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/9273e51c

Branch: refs/heads/master
Commit: 9273e51cd039049a4aae73f9dcafc02915bc6153
Parents: 2ccae40
Author: Alexandr Kuramshin <akuramshin@gridgain.com>
Authored: Mon Dec 26 13:23:28 2016 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Mon Dec 26 13:23:28 2016 +0300

----------------------------------------------------------------------
 .../apache/ignite/IgniteSystemProperties.java   |   5 +
 .../ignite/cache/affinity/AffinityKey.java      |   4 +-
 .../org/apache/ignite/events/CacheEvent.java    |   6 +-
 .../ignite/events/CacheQueryReadEvent.java      |   8 +-
 .../internal/binary/BinaryEnumObjectImpl.java   |  10 +-
 .../ignite/internal/binary/BinaryMetadata.java  |   5 +-
 .../internal/binary/BinaryObjectExImpl.java     |   8 +-
 .../cache/CacheInvokeDirectResult.java          |   2 +-
 .../processors/cache/CacheInvokeResult.java     |   2 +-
 .../processors/cache/CacheLazyEntry.java        |   4 +-
 .../processors/cache/CacheObjectAdapter.java    |   7 +-
 .../processors/cache/GridCacheAdapter.java      |   5 +-
 .../cache/GridCacheMvccCandidate.java           |   9 +-
 .../processors/cache/GridCacheReturn.java       |   2 +-
 .../distributed/dht/GridDhtCacheAdapter.java    |   2 +-
 .../distributed/near/GridNearLockFuture.java    |   2 +-
 .../cache/query/GridCacheQueryAdapter.java      |   2 +
 .../cache/query/GridCacheQueryManager.java      |  13 +-
 .../cache/query/GridCacheQueryRequest.java      |   2 +
 .../cache/query/GridCacheSqlQuery.java          |   4 +-
 .../continuous/CacheContinuousQueryEvent.java   |   8 +-
 .../continuous/CacheContinuousQueryManager.java |   4 +-
 .../store/GridCacheStoreManagerAdapter.java     |  30 +-
 .../cache/store/GridCacheWriteBehindStore.java  |   2 +-
 .../transactions/IgniteTxLocalAdapter.java      |  11 +-
 .../GridCacheVersionConflictContext.java        |   2 +-
 .../closure/GridClosureProcessor.java           |   4 +-
 .../continuous/GridContinuousMessage.java       |   2 +-
 .../datastructures/CollocatedSetItemKey.java    |   2 +-
 .../GridCacheAtomicLongValue.java               |   2 +
 .../GridCacheAtomicSequenceImpl.java            |   2 +
 .../GridCacheAtomicSequenceValue.java           |   2 +
 .../GridCacheCountDownLatchValue.java           |   3 +
 .../datastructures/GridCacheSetItemKey.java     |   2 +-
 .../internal/processors/job/GridJobWorker.java  |   7 +-
 .../odbc/OdbcQueryExecuteRequest.java           |   6 +-
 .../platform/PlatformNativeException.java       |   3 +-
 .../processors/rest/GridRestResponse.java       |   2 +-
 .../internal/util/future/GridFutureAdapter.java |   2 +-
 .../util/lang/GridMetadataAwareAdapter.java     |   2 +-
 .../util/tostring/GridToStringBuilder.java      | 642 +++++++++++++++++--
 .../util/tostring/GridToStringInclude.java      |  12 +-
 .../util/tostring/GridToStringThreadLocal.java  |  12 +-
 .../GridCacheBinaryObjectsAbstractSelfTest.java |   7 +-
 .../tostring/GridToStringBuilderSelfTest.java   |  33 +-
 45 files changed, 776 insertions(+), 130 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
index fe78d88..0da0f49 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
@@ -133,6 +133,11 @@ public final class IgniteSystemProperties {
     public static final String IGNITE_QUIET = "IGNITE_QUIET";
 
     /**
+     * Setting to {@code true} enables writing sensitive information in {@code toString()} output.
+     */
+    public static final String IGNITE_TO_STRING_INCLUDE_SENSITIVE = "IGNITE_TO_STRING_INCLUDE_SENSITIVE";
+
+    /**
      * If this property is set to {@code true} (default) and Ignite is launched
      * in verbose mode (see {@link #IGNITE_QUIET}) and no console appenders can be found
      * in configuration, then default console appender will be added.

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/cache/affinity/AffinityKey.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/affinity/AffinityKey.java b/modules/core/src/main/java/org/apache/ignite/cache/affinity/AffinityKey.java
index c745ed8..4215b05 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/affinity/AffinityKey.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/affinity/AffinityKey.java
@@ -60,12 +60,12 @@ public class AffinityKey<K> implements Externalizable {
     private static final long serialVersionUID = 0L;
 
     /** Key. */
-    @GridToStringInclude
+    @GridToStringInclude(sensitive = true)
     private K key;
 
     /** Affinity key. */
     @AffinityKeyMapped
-    @GridToStringInclude
+    @GridToStringInclude(sensitive = true)
     private Object affKey;
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/events/CacheEvent.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/events/CacheEvent.java b/modules/core/src/main/java/org/apache/ignite/events/CacheEvent.java
index 29aeb3d..30f4b37 100644
--- a/modules/core/src/main/java/org/apache/ignite/events/CacheEvent.java
+++ b/modules/core/src/main/java/org/apache/ignite/events/CacheEvent.java
@@ -90,7 +90,7 @@ public class CacheEvent extends EventAdapter {
     private int part;
 
     /** Cache entry. */
-    @GridToStringInclude
+    @GridToStringInclude(sensitive = true)
     private Object key;
 
     /** Event ID. */
@@ -102,11 +102,11 @@ public class CacheEvent extends EventAdapter {
     private final Object lockId;
 
     /** New value. */
-    @GridToStringInclude
+    @GridToStringInclude(sensitive = true)
     private final Object newVal;
 
     /** Old value. */
-    @GridToStringInclude
+    @GridToStringInclude(sensitive = true)
     private final Object oldVal;
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/events/CacheQueryReadEvent.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/events/CacheQueryReadEvent.java b/modules/core/src/main/java/org/apache/ignite/events/CacheQueryReadEvent.java
index 40c5dae..f63ed0c 100644
--- a/modules/core/src/main/java/org/apache/ignite/events/CacheQueryReadEvent.java
+++ b/modules/core/src/main/java/org/apache/ignite/events/CacheQueryReadEvent.java
@@ -96,19 +96,19 @@ public class CacheQueryReadEvent<K, V> extends EventAdapter {
     private final String taskName;
 
     /** Key. */
-    @GridToStringInclude
+    @GridToStringInclude(sensitive = true)
     private final K key;
 
     /** Value. */
-    @GridToStringInclude
+    @GridToStringInclude(sensitive = true)
     private final V val;
 
     /** Old value. */
-    @GridToStringInclude
+    @GridToStringInclude(sensitive = true)
     private final V oldVal;
 
     /** Result row. */
-    @GridToStringInclude
+    @GridToStringInclude(sensitive = true)
     private final Object row;
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryEnumObjectImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryEnumObjectImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryEnumObjectImpl.java
index 69de3f2..9fd6bc1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryEnumObjectImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryEnumObjectImpl.java
@@ -31,6 +31,7 @@ import org.apache.ignite.internal.GridDirectTransient;
 import org.apache.ignite.internal.processors.cache.CacheObject;
 import org.apache.ignite.internal.processors.cache.CacheObjectContext;
 import org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl;
+import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.SB;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.plugin.extensions.communication.MessageReader;
@@ -195,6 +196,9 @@ public class BinaryEnumObjectImpl implements BinaryObjectEx, Externalizable, Cac
 
     /** {@inheritDoc} */
     @Override public String toString() {
+        if (!S.INCLUDE_SENSITIVE)
+            return ord >= 0 ? "BinaryEnum" : "null";
+
         // 1. Try deserializing the object.
         try {
             Object val = deserialize();
@@ -216,12 +220,12 @@ public class BinaryEnumObjectImpl implements BinaryObjectEx, Externalizable, Cac
         }
 
         if (type != null)
-            return type.typeName() + "[ordinal=" + ord  + ']';
+            return S.toString(type.typeName(), "ordinal", ord, true);
         else {
             if (typeId == GridBinaryMarshaller.UNREGISTERED_TYPE_ID)
-                return "BinaryEnum[clsName=" + clsName + ", ordinal=" + ord + ']';
+                return S.toString("BinaryEnum", "clsName", clsName, true, "ordinal", ord, true);
             else
-                return "BinaryEnum[typeId=" + typeId + ", ordinal=" + ord + ']';
+                return S.toString("BinaryEnum", "typeId", typeId, true, "ordinal", ord, true);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryMetadata.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryMetadata.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryMetadata.java
index 0911d46..ec92b08 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryMetadata.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryMetadata.java
@@ -42,16 +42,19 @@ public class BinaryMetadata implements Externalizable {
     private static final long serialVersionUID = 0L;
 
     /** Type ID. */
+    @GridToStringInclude(sensitive = true)
     private int typeId;
 
     /** Type name. */
+    @GridToStringInclude(sensitive = true)
     private String typeName;
 
     /** Recorded object fields. */
-    @GridToStringInclude
+    @GridToStringInclude(sensitive = true)
     private Map<String, Integer> fields;
 
     /** Affinity key field name. */
+    @GridToStringInclude(sensitive = true)
     private String affKeyFieldName;
 
     /** Schemas associated with type. */

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryObjectExImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryObjectExImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryObjectExImpl.java
index e15e770..5f1e3e9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryObjectExImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryObjectExImpl.java
@@ -29,6 +29,7 @@ import org.apache.ignite.binary.BinaryObjectException;
 import org.apache.ignite.binary.BinaryType;
 import org.apache.ignite.internal.binary.builder.BinaryObjectBuilderImpl;
 import org.apache.ignite.internal.util.offheap.unsafe.GridUnsafeMemory;
+import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.SB;
 import org.apache.ignite.lang.IgniteUuid;
 import org.jetbrains.annotations.Nullable;
@@ -220,8 +221,11 @@ public abstract class BinaryObjectExImpl implements BinaryObjectEx {
             meta = null;
         }
 
-        if (meta == null)
-            return BinaryObject.class.getSimpleName() +  " [idHash=" + idHash + ", hash=" + hash + ", typeId=" + typeId() + ']';
+        if (meta == null || !S.INCLUDE_SENSITIVE)
+            return S.toString(S.INCLUDE_SENSITIVE ? BinaryObject.class.getSimpleName() : "BinaryObject",
+                "idHash", idHash, false,
+                "hash", hash, false,
+                "typeId", typeId(), true);
 
         handles.put(this, idHash);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeDirectResult.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeDirectResult.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeDirectResult.java
index 0d519f7..cc453f9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeDirectResult.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeDirectResult.java
@@ -45,7 +45,7 @@ public class CacheInvokeDirectResult implements Message {
     private CacheObject res;
 
     /** */
-    @GridToStringInclude
+    @GridToStringInclude(sensitive = true)
     @GridDirectTransient
     private Exception err;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeResult.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeResult.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeResult.java
index 48dabb9..b51c136 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeResult.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeResult.java
@@ -36,7 +36,7 @@ public class CacheInvokeResult<T> implements EntryProcessorResult<T>, Externaliz
     private static final long serialVersionUID = 0L;
 
     /** */
-    @GridToStringInclude
+    @GridToStringInclude(sensitive = true)
     private T res;
 
     /** */

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheLazyEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheLazyEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheLazyEntry.java
index 02cccc7..be6019e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheLazyEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheLazyEntry.java
@@ -36,11 +36,11 @@ public class CacheLazyEntry<K, V> extends CacheInterceptorEntry<K, V> {
     protected CacheObject valObj;
 
     /** Key. */
-    @GridToStringInclude
+    @GridToStringInclude(sensitive = true)
     protected K key;
 
     /** Value. */
-    @GridToStringInclude
+    @GridToStringInclude(sensitive = true)
     protected V val;
 
     /** Keep binary flag. */

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheObjectAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheObjectAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheObjectAdapter.java
index 70f5ea6..09a5524 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheObjectAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheObjectAdapter.java
@@ -24,6 +24,7 @@ import java.io.ObjectOutput;
 import java.nio.ByteBuffer;
 import org.apache.ignite.internal.GridDirectTransient;
 import org.apache.ignite.internal.util.tostring.GridToStringInclude;
+import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.plugin.extensions.communication.MessageReader;
 import org.apache.ignite.plugin.extensions.communication.MessageWriter;
@@ -36,7 +37,7 @@ public abstract class CacheObjectAdapter implements CacheObject, Externalizable
     private static final long serialVersionUID = 2006765505127197251L;
 
     /** */
-    @GridToStringInclude
+    @GridToStringInclude(sensitive = true)
     @GridDirectTransient
     protected Object val;
 
@@ -119,6 +120,8 @@ public abstract class CacheObjectAdapter implements CacheObject, Externalizable
 
     /** {@inheritDoc} */
     public String toString() {
-        return getClass().getSimpleName() + " [val=" + val + ", hasValBytes=" + (valBytes != null) + ']';
+        return S.toString(S.INCLUDE_SENSITIVE ? getClass().getSimpleName() : "CacheObject",
+            "val", val, true,
+            "hasValBytes", valBytes != null, false);
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index 4d59d50..965c6d1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -2571,7 +2571,10 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
             }
 
             @Override public String toString() {
-                return "putxAsync [key=" + key + ", val=" + val + ", filter=" + filter + ']';
+                return S.toString("putxAsync",
+                    "key", key, true,
+                    "val", val, true,
+                    "filter", filter, false);
             }
         });
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccCandidate.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccCandidate.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccCandidate.java
index e9dd455..c60d6c8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccCandidate.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccCandidate.java
@@ -36,7 +36,6 @@ import org.apache.ignite.internal.util.tostring.GridToStringInclude;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.SB;
-import org.apache.ignite.internal.util.typedef.internal.U;
 import org.jetbrains.annotations.Nullable;
 
 import static org.apache.ignite.internal.processors.cache.GridCacheMvccCandidate.Mask.DHT_LOCAL;
@@ -665,10 +664,10 @@ public class GridCacheMvccCandidate implements Externalizable,
         GridCacheMvccCandidate next = next();
 
         return S.toString(GridCacheMvccCandidate.class, this,
-            "key", parent == null ? null : parent.key(),
-            "masks", Mask.toString(flags()),
-            "prevVer", (prev == null ? null : prev.version()),
-            "nextVer", (next == null ? null : next.version()));
+            "key", parent == null ? null : parent.key(), true,
+            "masks", Mask.toString(flags()), false,
+            "prevVer", prev == null ? null : prev.version(), false,
+            "nextVer", next == null ? null : next.version(), false);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheReturn.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheReturn.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheReturn.java
index 29e74db..02c882c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheReturn.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheReturn.java
@@ -49,7 +49,7 @@ public class GridCacheReturn implements Externalizable, Message {
     private static final long serialVersionUID = 0L;
 
     /** Value. */
-    @GridToStringInclude
+    @GridToStringInclude(sensitive = true)
     @GridDirectTransient
     private volatile Object v;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
index 35e6267..b2fb7b4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
@@ -1166,7 +1166,7 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
 
         /** {@inheritDoc} */
         @Override public String toString() {
-            return S.toString(PartitionEntrySet.class, this, "super", super.toString());
+            return S.toString(PartitionEntrySet.class, this, "super", super.toString(), true);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
index 2431379..7c98602 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java
@@ -1487,7 +1487,7 @@ public final class GridNearLockFuture extends GridCompoundIdentityFuture<Boolean
         private ClusterNode node;
 
         /** Keys. */
-        @GridToStringInclude
+        @GridToStringInclude(sensitive = true)
         private Collection<KeyCacheObject> keys;
 
         /** */

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
index b29e5e7..1fe263d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java
@@ -45,6 +45,7 @@ import org.apache.ignite.internal.processors.query.GridQueryProcessor;
 import org.apache.ignite.internal.util.GridCloseableIteratorAdapter;
 import org.apache.ignite.internal.util.GridEmptyCloseableIterator;
 import org.apache.ignite.internal.util.lang.GridCloseableIterator;
+import org.apache.ignite.internal.util.tostring.GridToStringInclude;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.P1;
 import org.apache.ignite.internal.util.typedef.T2;
@@ -82,6 +83,7 @@ public class GridCacheQueryAdapter<T> implements CacheQuery<T> {
     private final String clsName;
 
     /** */
+    @GridToStringInclude(sensitive = true)
     private final String clause;
 
     /** */

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
index 1165157..85c01d9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
@@ -1539,16 +1539,17 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
                     if (log.isDebugEnabled()) {
                         ClusterNode primaryNode = CU.primaryNode(cctx, key);
 
-                        log.debug("Record [key=" + key +
-                            ", val=" + val +
-                            ", incBackups=" + incBackups +
-                            ", priNode=" + (primaryNode != null ? U.id8(primaryNode.id()) : null) +
-                            ", node=" + U.id8(cctx.localNode().id()) + ']');
+                        log.debug(S.toString("Record",
+                            "key", key, true,
+                            "val", val, true,
+                            "incBackups", incBackups, false,
+                            "priNode", primaryNode != null ? U.id8(primaryNode.id()) : null, false,
+                            "node", U.id8(cctx.localNode().id()), false));
                     }
 
                     if (val == null) {
                         if (log.isDebugEnabled())
-                            log.debug("Unsuitable record value: " + val);
+                            log.debug(S.toString("Unsuitable record value", "val", val, true));
 
                         continue;
                     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java
index 60c4662..ed876a2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryRequest.java
@@ -27,6 +27,7 @@ import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.processors.cache.GridCacheDeployable;
 import org.apache.ignite.internal.processors.cache.GridCacheMessage;
 import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
+import org.apache.ignite.internal.util.tostring.GridToStringInclude;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.internal.util.typedef.internal.S;
@@ -63,6 +64,7 @@ public class GridCacheQueryRequest extends GridCacheMessage implements GridCache
     private boolean fields;
 
     /** */
+    @GridToStringInclude(sensitive = true)
     private String clause;
 
     /** */

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
index bb769c9..8256270 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
@@ -47,11 +47,11 @@ public class GridCacheSqlQuery implements Message, GridCacheQueryMarshallable {
     public static final Object[] EMPTY_PARAMS = {};
 
     /** */
-    @GridToStringInclude
+    @GridToStringInclude(sensitive = true)
     private String qry;
 
     /** */
-    @GridToStringInclude
+    @GridToStringInclude(sensitive = true)
     @GridDirectTransient
     private Object[] params;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryEvent.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryEvent.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryEvent.java
index db70e2e..eddf302 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryEvent.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryEvent.java
@@ -99,9 +99,9 @@ class CacheContinuousQueryEvent<K, V> extends CacheQueryEntryEvent<K, V> {
     /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(CacheContinuousQueryEvent.class, this,
-            "evtType", getEventType(),
-            "key", getKey(),
-            "newVal", getValue(),
-            "oldVal", getOldValue());
+            "evtType", getEventType(), false,
+            "key", getKey(), true,
+            "newVal", getValue(), true,
+            "oldVal", getOldValue(), true);
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java
index e2fbf52..91c1991 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java
@@ -1209,11 +1209,11 @@ public class CacheContinuousQueryManager extends GridCacheManagerAdapter {
         private static final long serialVersionUID = 0L;
 
         /** */
-        @GridToStringInclude
+        @GridToStringInclude(sensitive = true)
         private Object key;
 
         /** */
-        @GridToStringInclude
+        @GridToStringInclude(sensitive = true)
         private Object val;
 
         /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java
index 024375e..11d9816 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheStoreManagerAdapter.java
@@ -314,7 +314,8 @@ public abstract class GridCacheStoreManagerAdapter extends GridCacheManagerAdapt
             Object storeKey = cctx.unwrapBinaryIfNeeded(key, !convertBinary());
 
             if (log.isDebugEnabled())
-                log.debug("Loading value from store for key: " + storeKey);
+                log.debug(S.toString("Loading value from store for key",
+                    "key", storeKey, true));
 
             sessionInit0(tx);
 
@@ -564,8 +565,11 @@ public abstract class GridCacheStoreManagerAdapter extends GridCacheManagerAdapt
             key = cctx.unwrapBinaryIfNeeded(key, !convertBinary());
             val = cctx.unwrapBinaryIfNeeded(val, !convertBinary());
 
-            if (log.isDebugEnabled())
-                log.debug("Storing value in cache store [key=" + key + ", val=" + val + ']');
+            if (log.isDebugEnabled()) {
+                log.debug(S.toString("Storing value in cache store",
+                    "key", key, true,
+                    "val", val, true));
+            }
 
             sessionInit0(tx);
 
@@ -589,8 +593,11 @@ public abstract class GridCacheStoreManagerAdapter extends GridCacheManagerAdapt
                 sessionEnd0(tx, threwEx);
             }
 
-            if (log.isDebugEnabled())
-                log.debug("Stored value in cache store [key=" + key + ", val=" + val + ']');
+            if (log.isDebugEnabled()) {
+                log.debug(S.toString("Stored value in cache store",
+                    "key", key, true,
+                    "val", val, true));
+            }
 
             return true;
         }
@@ -667,7 +674,7 @@ public abstract class GridCacheStoreManagerAdapter extends GridCacheManagerAdapt
             key = cctx.unwrapBinaryIfNeeded(key, !convertBinary());
 
             if (log.isDebugEnabled())
-                log.debug("Removing value from cache store [key=" + key + ']');
+                log.debug(S.toString("Removing value from cache store", "key", key, true));
 
             sessionInit0(tx);
 
@@ -692,7 +699,7 @@ public abstract class GridCacheStoreManagerAdapter extends GridCacheManagerAdapt
             }
 
             if (log.isDebugEnabled())
-                log.debug("Removed value from cache store [key=" + key + ']');
+                log.debug(S.toString("Removed value from cache store", "key", key, true));
 
             return true;
         }
@@ -715,7 +722,8 @@ public abstract class GridCacheStoreManagerAdapter extends GridCacheManagerAdapt
             Collection<Object> keys0 = cctx.unwrapBinariesIfNeeded(keys, !convertBinary());
 
             if (log.isDebugEnabled())
-                log.debug("Removing values from cache store [keys=" + keys0 + ']');
+                log.debug(S.toString("Removing values from cache store",
+                    "keys", keys0, true));
 
             sessionInit0(tx);
 
@@ -743,7 +751,8 @@ public abstract class GridCacheStoreManagerAdapter extends GridCacheManagerAdapt
             }
 
             if (log.isDebugEnabled())
-                log.debug("Removed values from cache store [keys=" + keys0 + ']');
+                log.debug(S.toString("Removed values from cache store",
+                    "keys", keys0, true));
 
             return true;
         }
@@ -1261,6 +1270,9 @@ public abstract class GridCacheStoreManagerAdapter extends GridCacheManagerAdapt
 
         /** {@inheritDoc} */
         public String toString() {
+            if (!S.INCLUDE_SENSITIVE)
+                return "[size=" + size() + "]";
+
             Iterator<Cache.Entry<?, ?>> it = iterator();
 
             if (!it.hasNext())

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStore.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStore.java
index 858d9a7..7e98793 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStore.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStore.java
@@ -908,7 +908,7 @@ public class GridCacheWriteBehindStore<K, V> implements CacheStore<K, V>, Lifecy
         private static final long serialVersionUID = 0L;
 
         /** Value. */
-        @GridToStringInclude
+        @GridToStringInclude(sensitive = true)
         private Entry<? extends K, ? extends V> val;
 
         /** Store operation. */

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
index 6d21dcf..e2f8438 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
@@ -83,6 +83,7 @@ import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.T2;
 import org.apache.ignite.internal.util.typedef.X;
 import org.apache.ignite.internal.util.typedef.internal.CU;
+import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteBiClosure;
 import org.apache.ignite.lang.IgniteBiTuple;
@@ -3331,10 +3332,12 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements Ig
 
         assert keys0 != null;
 
-        if (log.isDebugEnabled()) {
-            log.debug("Called removeAllAsync(...) [tx=" + this + ", keys=" + keys0 + ", implicit=" + implicit +
-                ", retval=" + retval + "]");
-        }
+        if (log.isDebugEnabled())
+            log.debug(S.toString("Called removeAllAsync(...)",
+                "tx", this, false,
+                "keys", keys0, true,
+                "implicit", implicit, false,
+                "retval", retval, false));
 
         try {
             checkValid();

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersionConflictContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersionConflictContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersionConflictContext.java
index 3849bf5..fa40206 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersionConflictContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersionConflictContext.java
@@ -178,7 +178,7 @@ public class GridCacheVersionConflictContext<K, V> {
     /** {@inheritDoc} */
     @Override public String toString() {
         return state == State.MERGE ?
-            S.toString(GridCacheVersionConflictContext.class, this, "mergeValue", mergeVal) :
+            S.toString(GridCacheVersionConflictContext.class, this, "mergeValue", mergeVal, true) :
             S.toString(GridCacheVersionConflictContext.class, this);
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosureProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosureProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosureProcessor.java
index a07dbf8..20fb6a0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosureProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosureProcessor.java
@@ -1778,7 +1778,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
         protected IgniteClosure<T, R> job;
 
         /** */
-        @GridToStringInclude
+        @GridToStringInclude(sensitive = true)
         private T arg;
 
         /**
@@ -1843,7 +1843,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
         protected IgniteClosure<T, R> job;
 
         /** */
-        @GridToStringInclude
+        @GridToStringInclude(sensitive = true)
         protected T arg;
 
         /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousMessage.java
index 0b629dd..91918c3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousMessage.java
@@ -48,7 +48,7 @@ public class GridContinuousMessage implements Message {
     private UUID routineId;
 
     /** Optional message data. */
-    @GridToStringInclude
+    @GridToStringInclude(sensitive = true)
     @GridDirectTransient
     private Object data;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/CollocatedSetItemKey.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/CollocatedSetItemKey.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/CollocatedSetItemKey.java
index 94cffd4..5f38114 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/CollocatedSetItemKey.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/CollocatedSetItemKey.java
@@ -30,7 +30,7 @@ public class CollocatedSetItemKey implements SetItemKey {
     private IgniteUuid setId;
 
     /** */
-    @GridToStringInclude
+    @GridToStringInclude(sensitive = true)
     private Object item;
 
     /** */

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicLongValue.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicLongValue.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicLongValue.java
index 42e43b6..5042672 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicLongValue.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicLongValue.java
@@ -22,6 +22,7 @@ import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 import org.apache.ignite.internal.processors.cache.GridCacheInternal;
+import org.apache.ignite.internal.util.tostring.GridToStringInclude;
 import org.apache.ignite.internal.util.typedef.internal.S;
 
 /**
@@ -32,6 +33,7 @@ public final class GridCacheAtomicLongValue implements GridCacheInternal, Extern
     private static final long serialVersionUID = 0L;
 
     /** Value. */
+    @GridToStringInclude(sensitive = true)
     private long val;
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicSequenceImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicSequenceImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicSequenceImpl.java
index 7474f46..4f660b6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicSequenceImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicSequenceImpl.java
@@ -36,6 +36,7 @@ import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.processors.cache.IgniteInternalCache;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
 import org.apache.ignite.internal.util.future.GridFinishedFuture;
+import org.apache.ignite.internal.util.tostring.GridToStringInclude;
 import org.apache.ignite.internal.util.typedef.internal.A;
 import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.internal.util.typedef.internal.S;
@@ -85,6 +86,7 @@ public final class GridCacheAtomicSequenceImpl implements GridCacheAtomicSequenc
     private volatile GridCacheContext ctx;
 
     /** Local value of sequence. */
+    @GridToStringInclude(sensitive = true)
     private long locVal;
 
     /**  Upper bound of local counter. */

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicSequenceValue.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicSequenceValue.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicSequenceValue.java
index dd1a1d5..ee540d6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicSequenceValue.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicSequenceValue.java
@@ -22,6 +22,7 @@ import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 import org.apache.ignite.internal.processors.cache.GridCacheInternal;
+import org.apache.ignite.internal.util.tostring.GridToStringInclude;
 import org.apache.ignite.internal.util.typedef.internal.S;
 
 /**
@@ -32,6 +33,7 @@ public final class GridCacheAtomicSequenceValue implements GridCacheInternal, Ex
     private static final long serialVersionUID = 0L;
 
     /** Counter. */
+    @GridToStringInclude(sensitive = true)
     private long val;
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchValue.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchValue.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchValue.java
index 17a11af..ec996ff 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchValue.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchValue.java
@@ -22,6 +22,7 @@ import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 import org.apache.ignite.internal.processors.cache.GridCacheInternal;
+import org.apache.ignite.internal.util.tostring.GridToStringInclude;
 import org.apache.ignite.internal.util.typedef.internal.S;
 
 /**
@@ -32,9 +33,11 @@ public final class GridCacheCountDownLatchValue implements GridCacheInternal, Ex
     private static final long serialVersionUID = 0L;
 
     /** Count. */
+    @GridToStringInclude(sensitive = true)
     private int cnt;
 
     /** Initial count. */
+    @GridToStringInclude(sensitive = true)
     private int initCnt;
 
     /** Auto delete flag. */

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSetItemKey.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSetItemKey.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSetItemKey.java
index 8b47b3d..4280891 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSetItemKey.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSetItemKey.java
@@ -37,7 +37,7 @@ public class GridCacheSetItemKey implements SetItemKey, Externalizable {
     private IgniteUuid setId;
 
     /** */
-    @GridToStringInclude
+    @GridToStringInclude(sensitive = true)
     private Object item;
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobWorker.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobWorker.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobWorker.java
index 9bee849..6a00d96 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobWorker.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/job/GridJobWorker.java
@@ -566,8 +566,11 @@ public class GridJobWorker extends GridWorker implements GridTimeoutObject {
                         }
                     });
 
-                    if (log.isDebugEnabled())
-                        log.debug("Job execution has successfully finished [job=" + job + ", res=" + res + ']');
+                    if (log.isDebugEnabled()) {
+                        log.debug(S.toString("Job execution has successfully finished",
+                            "job", job, false,
+                            "res", res, true));
+                    }
                 }
             }
             catch (IgniteException e) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcQueryExecuteRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcQueryExecuteRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcQueryExecuteRequest.java
index 1bcd41f..c0d1c60 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcQueryExecuteRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcQueryExecuteRequest.java
@@ -18,11 +18,10 @@
 package org.apache.ignite.internal.processors.odbc;
 
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
+import org.apache.ignite.internal.util.tostring.GridToStringInclude;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.jetbrains.annotations.Nullable;
 
-import java.util.Arrays;
-
 /**
  * ODBC query execute request.
  */
@@ -31,6 +30,7 @@ public class OdbcQueryExecuteRequest extends OdbcRequest {
     private final String cacheName;
 
     /** Sql query. */
+    @GridToStringInclude(sensitive = true)
     private final String sqlQry;
 
     /** Sql query arguments. */
@@ -73,6 +73,6 @@ public class OdbcQueryExecuteRequest extends OdbcRequest {
 
     /** {@inheritDoc} */
     @Override public String toString() {
-        return S.toString(OdbcQueryExecuteRequest.class, this, "args", Arrays.toString(args));
+        return S.toString(OdbcQueryExecuteRequest.class, this, "args", args, true);
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformNativeException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformNativeException.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformNativeException.java
index a99664a..5c77cf2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformNativeException.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformNativeException.java
@@ -72,6 +72,7 @@ public class PlatformNativeException extends PlatformException implements Extern
 
     /** {@inheritDoc} */
     @Override public String toString() {
-        return S.toString(PlatformNativeException.class, this, "cause", cause);
+        return S.toString(PlatformNativeException.class, this,
+            "cause", S.INCLUDE_SENSITIVE ? cause : (cause == null ? "null" : cause.getClass().getSimpleName()));
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestResponse.java
index ecbc6c8..18d1ddf 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestResponse.java
@@ -59,7 +59,7 @@ public class GridRestResponse implements Externalizable {
     private String err;
 
     /** Response object. */
-    @GridToStringInclude
+    @GridToStringInclude(sensitive = true)
     private Object obj;
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFutureAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFutureAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFutureAdapter.java
index 2cd534e..08c39c0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFutureAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFutureAdapter.java
@@ -61,7 +61,7 @@ public class GridFutureAdapter<R> extends AbstractQueuedSynchronizer implements
     private byte resFlag;
 
     /** Result. */
-    @GridToStringInclude
+    @GridToStringInclude(sensitive = true)
     private Object res;
 
     /** Future start time. */

http://git-wip-us.apache.org/repos/asf/ignite/blob/9273e51c/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridMetadataAwareAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridMetadataAwareAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridMetadataAwareAdapter.java
index decc244..1983ea3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridMetadataAwareAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridMetadataAwareAdapter.java
@@ -67,7 +67,7 @@ public class GridMetadataAwareAdapter {
     }
 
     /** Attributes. */
-    @GridToStringInclude
+    @GridToStringInclude(sensitive = true)
     private Object[] data = null;
 
     /**


Mime
View raw message