IGNITE-7284: Do not check system property value every time

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

Branch: refs/heads/master
Commit: 6ab2cc38de6c6cdb466608fc7a92ed50bc1ddfb7
Parents: edc5a5f
Author: Valentin Kulichenko <[email protected]>
Authored: Thu Jan 18 17:30:33 2018 -0800
Committer: Valentin Kulichenko <[email protected]>
Committed: Thu Jan 18 17:30:33 2018 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/ignite/internal/util/IgniteUtils.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/6ab2cc38/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java 
b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index 523939b..0f6a41a 100755
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -541,6 +541,10 @@ public abstract class IgniteUtils {
      */
     private static final Field urlClsLdrField = urlClassLoaderField();
 
+    /** Dev only logging disabled. */
+    private static boolean devOnlyLogDisabled =
+        
IgniteSystemProperties.getBoolean(IgniteSystemProperties.IGNITE_DEV_ONLY_LOGGING_DISABLED);
+
     /*
      * Initializes enterprise check.
      */
@@ -4284,7 +4288,7 @@ public abstract class IgniteUtils {
         assert msg != null;
 
         // don't log message if DEV_ONLY messages are disabled
-        if 
(IgniteSystemProperties.getBoolean(IgniteSystemProperties.IGNITE_DEV_ONLY_LOGGING_DISABLED))
+        if (devOnlyLogDisabled)
             return;
 
         if (log != null)

Reply via email to