Skip to content

Commit 71a28f9

Browse files
authored
Merge pull request #781 from tpmccallum/update_docs_to_use_follow_all
Add option to use --follow-all when running Redis Trigger (to see messages interactively, as apposed to via logs)
2 parents 9fb4841 + e95e535 commit 71a28f9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

docs/content/rust-components.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ message on the `messages` channel, the `echo-message` component will be executed
194194
$ redis-server --port 6379
195195
# then, start the Spin application
196196
$ spin up --file spin.toml
197+
# the application log file will output the following
197198
INFO spin_redis_engine: Connecting to Redis server at redis://localhost:6379
198199
INFO spin_redis_engine: Subscribed component 0 (echo-message) to channel: messages
199200
```
@@ -205,13 +206,19 @@ $ redis-cli
205206
127.0.0.1:6379> publish messages "Hello, there!"
206207
```
207208

208-
Spin will instantiate and execute the component we just built:
209+
Spin will instantiate and execute the component we just built, which will emit the `println!` message to the application log file:
209210

210211
```
211212
INFO spin_redis_engine: Received message on channel "messages"
212213
Hello, there!
213214
```
214215

216+
If you would also like to see the `println!` messages echoed to the console as they happen, please include the additional `--follow-all` option, when starting the spin application. For example:
217+
218+
```bash
219+
spin up --file spin.toml --follow-all
220+
```
221+
215222
> You can find a complete example for a Redis triggered component in the
216223
> [Spin repository on GitHub](https://github.com/fermyon/spin/tree/main/examples/redis-rust).
217224

0 commit comments

Comments
 (0)