is documentation outdated?
serii833 opened this issue · 4 comments
is documentation outdated?
I'm trying "Hello World" examples and they don't seem to be correct.
I was able to run them with config tweaking.
I've found some other inconsistencies through docs.
Am I missing something?
Hey @serii833,
can you provide us a little bit more information?
E.g.,
- Can you post the config you used?
- Can you post the config you tweaked and post the working config?
- Which Gollum version are you using?
my Gollum version 0.5.3 (precompiled binary)
I take first example from this page https://gollum.readthedocs.io/en/latest/src/examples/helloWorld.html
- "consumer.Console":
Stream: "console"
- "producer.Console":
Formatter: "format.Envelope"
Stream:
- "*"
- "_GOLLUM_"
when i try to run Gollum with this config I've got following:
[2018-12-18 22:44:14 +03] ERROR Failed to read config error=yaml: unmarshal errors:
line 1: cannot unmarshal !!seq into map[string]tcontainer.MarshalMap
after making config to look like this
"consumer.Console":
Type: consumer.Console
Streams:
- "console"
"producer.Console":
Type: producer.Console
# Formatter: "format.Envelope"
# ERROR Failed to instantiate producer 'producer.Console' error=Unknown configuration key 'Formatter' in 'producer.Console'
Streams:
- "*"
- "_GOLLUM_"
Gollum starts and working
Another example
this page https://gollum.readthedocs.io/en/latest/src/gen/consumer/console.html describes "console" consumer.
There is parameter "Modulators" among others.
Defines a list of modulators to be applied to a message
there is no "modulators" section in docs, but there is a "filters" section.
I made assumption that modulator are filters and it made sense.
Yeah, it seems that the examples are still using the old v0.4 keywords although the general structure has been updated. The transformation is mentioned in the release notes.
format.Envelope
is a modulator that you can specify in the modulators
list of consumers and producers. Check the example for format.Envelope
.
Your config should then look like this:
"consumer.Console":
Type: consumer.Console
Streams:
- "console"
"producer.Console":
Type: producer.Console
Modulators:
- format.Envelope
Streams:
- "*"
- "_GOLLUM_"
Filters and formatters are both modulators. The documentation hierarchy isn't very clear in that regard.
The examples have been updated to 0.5.x format along with the 0.5.4 release.
Thanks for pointing this out 👍