You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2019/04/04 11:25:56 UTC

[tinkerpop] branch master updated: TINKERPOP-2180: Fix -l DEBUG

This is an automated email from the ASF dual-hosted git repository.

spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/master by this push:
     new 62158d2  TINKERPOP-2180: Fix -l DEBUG
     new ec847df  Merge branch 'tp33'
62158d2 is described below

commit 62158d28ce647fd935bf7c61a6ac4239d9e214c8
Author: Eduard Tudenhoefner <ed...@datastax.com>
AuthorDate: Thu Apr 4 07:56:38 2019 +0200

    TINKERPOP-2180: Fix -l DEBUG
---
 gremlin-console/src/main/bin/gremlin.sh               | 2 +-
 gremlin-console/src/test/python/tests/test_console.py | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gremlin-console/src/main/bin/gremlin.sh b/gremlin-console/src/main/bin/gremlin.sh
index b12983f..c675cc9 100755
--- a/gremlin-console/src/main/bin/gremlin.sh
+++ b/gremlin-console/src/main/bin/gremlin.sh
@@ -102,7 +102,7 @@ JVM_OPTS=$(awk -v RS=' ' '!/^$/ {if (!x[$0]++) print}' <<< "${JVM_OPTS}" | grep
 
 if [ -n "$SCRIPT_DEBUG" ]; then
     # in debug mode enable debugging of :install command
-    JVM_OPTS="${JAVA_OPTIONS} -Divy.message.logger.level=4 -Dgroovy.grape.report.downloads=true"
+    JVM_OPTS+=( "-Divy.message.logger.level=4 -Dgroovy.grape.report.downloads=true" )
     echo "CLASSPATH: $CLASSPATH"
     set -x
 fi
diff --git a/gremlin-console/src/test/python/tests/test_console.py b/gremlin-console/src/test/python/tests/test_console.py
index 3e22929..b40b414 100644
--- a/gremlin-console/src/test/python/tests/test_console.py
+++ b/gremlin-console/src/test/python/tests/test_console.py
@@ -166,6 +166,11 @@ class TestConsole(object):
         child.expect("-i and -e options are mutually exclusive - provide one or the other")
         child.expect(pexpect.EOF)
 
+    def test_debug_logging(self):
+        child = pexpect.spawn(TestConsole.gremlinsh + "-l DEBUG --execute y-printed.script 1 2 3")
+        child.expect("6\r\n")
+        TestConsole._close(child)
+
     @staticmethod
     def _expect_gremlin_header(child):
         # skip/read the Gremlin graphics