feat: now supports async functions for logging data
ci/woodpecker/push/ci Pipeline failed
ci/woodpecker/push/publish unknown status

- `logger.debug('message', async () => ({ asyncReturn: await asyncFn() }))` is now supported
- NOTE: this may result in logging occurring out of band for these calls if other events fire befor they settle

Update CI labels to direct jobs to correct servers
This commit is contained in:
2026-08-21 11:24:34 -03:00
parent 292f44821d
commit 16550ec8bb
16 changed files with 217 additions and 82 deletions
+5
View File
@@ -196,8 +196,13 @@ Any function passed **after** the first argument is invoked only if the event is
```ts
logger.debug("state", () => buildHugeSnapshot()); // skipped when debug is suppressed
logger.debug("response", async () => ({ data: await res.json(), url }));
```
Top-level thenables (including Promises returned from lazy factories, or a Promise passed directly as an argument) are settled before sinks run. The log call stays fire-and-forget (`void`). Settled events set `LogEvent.async`, and the console sink renders an `[async]` label suffix. Nested promises inside plain objects are not walked — compose them inside the async factory. Async emits may appear out of order relative to sync logs.
Rejection reasons replace rejected thenables in that argument slot; other arguments still emit.
## Releases
Woodpecker verifies pull requests and `main`, reports CI to Mattermost, then automatically releases from Conventional Commits merged to `main`. It updates `package.json` and `CHANGELOG.md`, creates a `vX.Y.Z` tag, and publishes to the private `@mifi` registry.