Author:
Hash:
Timestamp:
+13 -0 +/-3 browse
Kevin Schoon [me@kevinschoon.com]
c3ab4b5bade2df335f7d5d1c3bc2ba579d7ee505
Sat, 18 Jul 2026 15:06:51 +0000 (1 month ago)
| 1 | diff --git a/ayllu-dispatch/src/config.rs b/ayllu-dispatch/src/config.rs |
| 2 | index a149a7b..6820815 100644 |
| 3 | --- a/ayllu-dispatch/src/config.rs |
| 4 | +++ b/ayllu-dispatch/src/config.rs |
| 5 | @@ -8,6 +8,8 @@ use crate::notify::Notifier; |
| 6 | pub enum Actor { |
| 7 | #[serde(rename = "notify")] |
| 8 | Notify(crate::notify::Config), |
| 9 | + #[serde(rename = "logger")] |
| 10 | + Logger, |
| 11 | } |
| 12 | |
| 13 | #[derive(Serialize, Deserialize)] |
| 14 | diff --git a/ayllu-dispatch/src/main.rs b/ayllu-dispatch/src/main.rs |
| 15 | index 9c4d785..a10ad13 100644 |
| 16 | --- a/ayllu-dispatch/src/main.rs |
| 17 | +++ b/ayllu-dispatch/src/main.rs |
| 18 | @@ -32,6 +32,13 @@ fn main() -> Result<(), Error> { |
| 19 | // TODO: Need timeout here |
| 20 | notifier.on_event(&config.common.origin, conn, event, notify_config)?; |
| 21 | } |
| 22 | + config::Actor::Logger => { |
| 23 | + tracing::info!( |
| 24 | + timestamp = format!("{}", event.timestamp), |
| 25 | + kind = format!("{}", event.kind), |
| 26 | + object_id = format!("{:?}", event.object_id) |
| 27 | + ); |
| 28 | + } |
| 29 | } |
| 30 | Ok::<_, crate::Error>(()) |
| 31 | }) |
| 32 | diff --git a/config.example.toml b/config.example.toml |
| 33 | index db338bb..5606ca5 100644 |
| 34 | --- a/config.example.toml |
| 35 | +++ b/config.example.toml |
| 36 | @@ -278,3 +278,7 @@ selectors = ["BuildStarted", "BuildFinished"] |
| 37 | # NOTE that a wildcard here will result in MANY notifications |
| 38 | # selectors = ["*"] |
| 39 | actor = { notify = { topic = "ayllu-main" } } |
| 40 | + |
| 41 | + [[dispatch.on_event]] |
| 42 | + selectors = ["*"] |
| 43 | + actor = "logger" |