Skip to content

Easy way to show only query on debugger log #350

Open
@giovanniac

Description

@giovanniac

I have a situation where I want to activate only the query debug logger while I set up the driver builder. The debug log output that I want to activate is shown in line 135 here:

https://github.com/arangodb/arangodb-java-driver/blob/71fb190ba316f3c618514633fd51e2101a95756e/src/main/java/com/arangodb/internal/velocystream/VstCommunicationSync.java

It would be interesting to have an easy way to access this option for future troubleshooting and to have a better and more transparent point of view of what query is being builded up while developing.

Thanks for the help!

Activity

rashtao

rashtao commented on Jul 3, 2020

@rashtao
Collaborator

You can enable debug level for such logger adding the following to your logback.xml:

    <logger name="com.arangodb.internal.velocystream.VstCommunicationSync" level="debug"/>

Additionally you might want to filter the logged rows using Logback filters: http://logback.qos.ch/manual/filters.html

PauloFerreira25

PauloFerreira25 commented on Jul 3, 2020

@PauloFerreira25
Contributor

Problems with this approach:

  1. The log is by class and not by function.
    If someone ever puts another log in this class, something that does not mean that it is the query will come out.

  2. when the driver proves to be "professional".
    Having a flag that turns a driver function on or off is much more professional than simply turning on a debug.
    You put in the driver's documentation that this parameter exists, it is quite different from what you put in that the way to use it is to turn on the debugging of an "unknown" class.

rashtao

rashtao commented on Jul 13, 2020

@rashtao
Collaborator

Thanks for sharing, we will consider the possibility to implement logging categories in future versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @rashtao@PauloFerreira25@giovanniac

        Issue actions

          Easy way to show only query on debugger log · Issue #350 · arangodb/arangodb-java-driver