diff options
| author | Tomáš Linhart <[email protected]> | 2026-02-03 22:21:15 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-02-03 15:21:15 -0600 |
| commit | 0a5d5bc524d038829e7dd39d4cb73bc3898206a7 (patch) | |
| tree | 2b6bb5e764e997f3347479f2bdddac2793b62826 | |
| parent | a30696f9bfefc58d640316c6a864c9bb255de690 (diff) | |
| download | opencode-0a5d5bc524d038829e7dd39d4cb73bc3898206a7.tar.gz opencode-0a5d5bc524d038829e7dd39d4cb73bc3898206a7.zip | |
docs: fix logging example for plugin (#11989)
| -rw-r--r-- | packages/web/src/content/docs/plugins.mdx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/packages/web/src/content/docs/plugins.mdx b/packages/web/src/content/docs/plugins.mdx index 394fecc40..411b827d2 100644 --- a/packages/web/src/content/docs/plugins.mdx +++ b/packages/web/src/content/docs/plugins.mdx @@ -317,10 +317,12 @@ Use `client.app.log()` instead of `console.log` for structured logging: ```ts title=".opencode/plugins/my-plugin.ts" export const MyPlugin = async ({ client }) => { await client.app.log({ - service: "my-plugin", - level: "info", - message: "Plugin initialized", - extra: { foo: "bar" }, + body: { + service: "my-plugin", + level: "info", + message: "Plugin initialized", + extra: { foo: "bar" }, + }, }) } ``` |
