vectordotdev/vector

Make `vector generate` output documentation

Open

#1,687 创建于 2020年2月3日

在 GitHub 查看
 (3 评论) (4 反应) (0 负责人)Rust (21,837 star) (2,126 fork)batch import
domain: clidomain: configdomain: setupgood first issuetype: enhancement

描述

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.

贡献者指南

Make `vector generate` output documentation · vectordotdev/vector#1687 | Good First Issue