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

chore: Make LogSchema more optional #2113

Merged
merged 2 commits into from
Mar 24, 2020

Conversation

Hoverbear
Copy link
Contributor

Fixes #2110 .

PS C:\Users\Operator\CLionProjects\vector> cat .\test.toml
data_dir = "/var/lib/vector/"
dns_servers = []

log_schema.host_key = "instance_id"

[sources.source0]
max_length = 102400
type = "stdin"

[sinks.sink0]
healthcheck = true
inputs = ["source0"]
type = "console"
encoding = "json"

[sinks.sink0.buffer]
type = "memory"
max_events = 500
when_full = "block"


PS C:\Users\Operator\CLionProjects\vector> cargo run --no-default-features --features default-msvc -- --config test.toml
    Finished dev [unoptimized + debuginfo] target(s) in 0.90s
     Running `target\debug\vector.exe --config test.toml`
Mar 21 13:07:38.477  INFO vector: Log level "info" is enabled.
Mar 21 13:07:38.478  INFO vector: Loading configs. path=["test.toml"]
Mar 21 13:07:38.494  INFO vector: Vector is starting. version="0.9.0" git_version="v0.8.0-124-g838a80b" released="Sat, 21 M
ar 2020 19:50:16 +0000" arch="x86_64"
Mar 21 13:07:38.512  INFO vector::topology: Running healthchecks.
Mar 21 13:07:38.512  INFO vector::topology: Waiting for up to 3 seconds for sources to finish shutting down
Mar 21 13:07:38.513  INFO vector::topology: Waiting for up to 3 seconds for sources to finish shutting down
Mar 21 13:07:38.512  INFO vector::topology::builder: Healthcheck: Passed.
Mar 21 13:07:38.515  INFO vector::topology: Starting source "source0"
Mar 21 13:07:38.517  INFO vector::topology: Starting sink "sink0"
Mar 21 13:07:38.517  INFO source{name=source0 type=stdin}: vector::sources::stdin: Capturing STDIN
test
{"instance_id":"OBSIDIAN","message":"test","timestamp":"2020-03-21T20:07:40.652455500Z"}
Mar 21 13:07:42.278  INFO vector: Shutting down.

Added bonus:

PS C:\Users\Operator\CLionProjects\vector> cargo run --no-default-features --features default-msvc -- generate stdin//conso
le
    Finished dev [unoptimized + debuginfo] target(s) in 0.91s
     Running `target\debug\vector.exe generate stdin//console`
data_dir = "/var/lib/vector/"
dns_servers = []

[sources.source0]
max_length = 102400
type = "stdin"

[sinks.sink0]
healthcheck = true
inputs = ["source0"]
type = "console"

[sinks.sink0.buffer]
type = "memory"
max_events = 500
when_full = "block"

Signed-off-by: Ana Hobden <operator@hoverbear.org>
@Hoverbear Hoverbear added type: enhancement A value-adding code change that enhances its existing functionality. domain: config Anything related to configuring Vector labels Mar 21, 2020
@Hoverbear Hoverbear requested a review from a user March 21, 2020 20:10
@Hoverbear Hoverbear assigned Hoverbear and ghost Mar 21, 2020
@binarylogic
Copy link
Contributor

From planning: add behavior test that sets global option and tests this behavior.

@Hoverbear
Copy link
Contributor Author

@binarylogic We can't use behavior tests for this until we do #1792

@Hoverbear Hoverbear merged commit 6edfbc9 into vectordotdev:master Mar 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: config Anything related to configuring Vector type: enhancement A value-adding code change that enhances its existing functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make it possible to specify only some of the global schema keys
2 participants