This is an automated email from the ASF dual-hosted git repository.
divijv pushed a commit to branch 3.4-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
The following commit(s) were added to refs/heads/3.4-dev by this push:
new 1c822e8 CTR - Guard expensive debug message
1c822e8 is described below
commit 1c822e8824e1a7be724063f498f8c9d13a752cd1
Author: Divij Vaidya <[email protected]>
AuthorDate: Mon Aug 24 15:32:45 2020 -0700
CTR - Guard expensive debug message
Guard an expensive debug message with a check on logger level. Using CTR
since this is a minor change.
---
.../org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java
index 182c644..d8c71e6 100644
---
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java
+++
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java
@@ -247,7 +247,9 @@ public class GremlinExecutor implements AutoCloseable {
public CompletableFuture<Object> eval(final String script, final String
language, final Bindings boundVars, final LifeCycle lifeCycle) {
final String lang =
Optional.ofNullable(language).orElse("gremlin-groovy");
- logger.debug("Preparing to evaluate script - {} - in thread [{}]",
script, Thread.currentThread().getName());
+ if (logger.isDebugEnabled()) {
+ logger.debug("Preparing to evaluate script - {} - in thread [{}]",
script, Thread.currentThread().getName());
+ }
final Bindings bindings = new SimpleBindings();
bindings.putAll(globalBindings);