Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(flags): Expose global flags to dgraph subcommands. #7530

Merged
merged 1 commit into from Mar 17, 2021

Conversation

danielmai
Copy link
Contributor

@danielmai danielmai commented Mar 9, 2021

This updates the subcommand --help template so that flags like --config show
up in the --help output under the "Global Flags:" section.

Example:

$ dgraph alpha --help
...
Global Flags:
      --alsologtostderr                  log to standard error as well as files
      --bindall                          Use 0.0.0.0 instead of localhost to bind to all addresses on local machine. (default true)
      --block_rate int                   Block profiling rate. Must be used along with block profile_mode
      --config string                    Configuration file. Takes precedence over default values, but is overridden to values set with environment variables and flags.
      --cwd string                       Change working directory to the path specified. The parent must exist.
      --expose_trace                     Allow trace endpoint to be accessible from remote
      --log_backtrace_at traceLocation   when logging hits line file:N, emit a stack trace (default :0)
      --log_dir string                   If non-empty, write log files in this directory
      --logtostderr                      log to standard error instead of files
      --profile_mode string              Enable profiling mode, one of [cpu, mem, mutex, block]
  -v, --v Level                          log level for V logs
      --vmodule moduleSpec               comma-separated list of pattern=N settings for file-filtered logging

This change is Reviewable

This updates the subcommand --help template so that flags like `--config` show
up in the --help output under the "Global Flags:" section.

Example:

    $ dgraph alpha --help
    ...
    Global Flags:
          --alsologtostderr                  log to standard error as well as files
          --bindall                          Use 0.0.0.0 instead of localhost to bind to all addresses on local machine. (default true)
          --block_rate int                   Block profiling rate. Must be used along with block profile_mode
          --config string                    Configuration file. Takes precedence over default values, but is overridden to values set with environment variables and flags.
          --cwd string                       Change working directory to the path specified. The parent must exist.
          --expose_trace                     Allow trace endpoint to be accessible from remote
          --log_backtrace_at traceLocation   when logging hits line file:N, emit a stack trace (default :0)
          --log_dir string                   If non-empty, write log files in this directory
          --logtostderr                      log to standard error instead of files
          --profile_mode string              Enable profiling mode, one of [cpu, mem, mutex, block]
      -v, --v Level                          log level for V logs
          --vmodule moduleSpec               comma-separated list of pattern=N settings for file-filtered logging
@danielmai danielmai merged commit 079afba into master Mar 17, 2021
@danielmai danielmai deleted the danielmai/global-flags branch March 17, 2021 05:18
aman-bansal pushed a commit that referenced this pull request Apr 7, 2021
This updates the subcommand --help template so that flags like `--config` show
up in the --help output under the "Global Flags:" section.

Example:

    $ dgraph alpha --help
    ...
    Global Flags:
          --alsologtostderr                  log to standard error as well as files
          --bindall                          Use 0.0.0.0 instead of localhost to bind to all addresses on local machine. (default true)
          --block_rate int                   Block profiling rate. Must be used along with block profile_mode
          --config string                    Configuration file. Takes precedence over default values, but is overridden to values set with environment variables and flags.
          --cwd string                       Change working directory to the path specified. The parent must exist.
          --expose_trace                     Allow trace endpoint to be accessible from remote
          --log_backtrace_at traceLocation   when logging hits line file:N, emit a stack trace (default :0)
          --log_dir string                   If non-empty, write log files in this directory
          --logtostderr                      log to standard error instead of files
          --profile_mode string              Enable profiling mode, one of [cpu, mem, mutex, block]
      -v, --v Level                          log level for V logs
          --vmodule moduleSpec               comma-separated list of pattern=N settings for file-filtered logging
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant