JanusGraph / JanusGraph/janusgraph

gremlin-server.sh produces debug output by default

Open
#1,189 1 comment 3 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
5.8k
Forks
1.2k
Avg merge
13h 53m
Merged PRs (30d)
6

Description

The `gremlin-server.sh` script distributed with JanusGraph [contains this line](https://github.com/JanusGraph/janusgraph/blob/master/janusgraph-dist/src/assembly/static/bin/gremlin-server.sh#L57):
```sh
set -x
```
which means that the command used to start the server with all its arguments will be printed. This leads to unnecessary debug output. The [corresponding file in TinkerPop's repo](https://github.com/apache/tinkerpop/blob/master/gremlin-server/src/main/bin/gremlin-server.sh#L32) does this only when a debug flag is set:
```sh
[[ -n "$DEBUG" ]] && set -x
```

In environment where everything printed to console is collected as logs like frequently done with Docker, This leads to uinteresting and hard to parse log entries as the format can't be configured.

I suggest that this line is simply removed from the script or only activated when a debug flag is set like how it's done in TinkerPop.

Contributor guide

Open the contributing guide

Research direction

Start with janusgraph-dist/src/assembly/static/bin/gremlin-server.sh and inspect the set -x line, then compare the corresponding TinkerPop script linked in the issue. Done means gremlin-server.sh no longer prints command arguments by default, while the chosen debug behavior is preserved or made conditional as proposed.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
cli
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.