[ 
https://issues.apache.org/jira/browse/TINKERPOP-2471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17617022#comment-17617022
 ] 

ASF GitHub Bot commented on TINKERPOP-2471:
-------------------------------------------

FlorianHockmann commented on code in PR #1827:
URL: https://github.com/apache/tinkerpop/pull/1827#discussion_r994594215


##########
gremlin-dotnet/test/Gremlin.Net.UnitTest/Process/Traversal/BytecodeTests.cs:
##########
@@ -172,5 +172,16 @@ public void 
ShouldUseBindingsInsideHashSetInSourceArgument()
             var arg = bytecode.SourceInstructions[0].Arguments[0] as 
ISet<object>;
             Assert.Equal(new Binding("setVariable", "setValue"), 
arg.ToList()[1]);
         }
+
+        [Fact]
+        public void ShouldIncludeStepAndSourceInstructionsForToString()
+        {
+            var bytecode = new Bytecode();
+            bytecode.AddSource("source", 1, 2);
+            bytecode.AddStep("step1", 9, 8);
+            bytecode.AddStep("step2", 0);
+            
+            Assert.Equal("[[source(1, 2)], [step1(9, 8), step2(0)]]", 
bytecode.ToString());

Review Comment:
   Good suggestion! I actually didn't think about logging of `null` arguments 
which shouldn't be represented completely empty in the string representation so 
I changed `Instruction.ToString()` to properly handle `null` arguments.





> Add logging to Gremlin.Net driver
> ---------------------------------
>
>                 Key: TINKERPOP-2471
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2471
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: dotnet
>            Reporter: Florian Hockmann
>            Priority: Minor
>
> It would be helpful to have logging in the driver to get insights into its 
> internal state. Examples for events that we could log are:
>  * A connection is dead & will be replaced.
>  * The pool is empty, so we cannot get a connection for the current request 
> (but will probably try again)
> This should make it more transparent for users how the driver operates and 
> what its current state is.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to