vectordotdev/vector

Make `vector generate` output documentation

Open

#1.687 geöffnet am 3. Feb. 2020

Auf GitHub ansehen
 (3 Kommentare) (4 Reaktionen) (0 zugewiesene Personen)Rust (2.126 Forks)batch import
domain: clidomain: configdomain: setupgood first issuetype: enhancement

Repository-Metriken

Stars
 (21.837 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 8T 16h) (110 gemergte PRs in 30 T)

Beschreibung

Right now vector generate outputs quite minimal configurations.

❯ vector generate "stdin"
data_dir = '/var/lib/vector/'
dns_servers = []
[sources.source0]
max_length = 102400
type = 'stdin'

This issue proposes the output be something like the following:

#                                    __   __  __
#                                    \ \ / / / /
#                                     \ V / / /
#                                      \_/  \/
#
#                                    V E C T O R
#                                   Configuration
#
# ------------------------------------------------------------------------------
# Website: https://vector.dev
# Docs: https://vector.dev/docs/
# ------------------------------------------------------------------------------

# The location of data storage
data_dir = '/var/lib/vector/'
# Custom DNS servers to use (if any)
dns_servers = []

[sources.source0]
# https://vector.dev/docs/reference/sources/stdin/
type = 'stdin'
# The maxiumum bytes size of a message before it is discarded.
max_length = 102400

We may want to opt for a smaller logo, or none at all. We also may want to output commented versions of fields that are using defaults.

Contributor Guide