plugin-logging
Use client.app.log() instead of console.log in OpenCode plugins
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Use client.app.log() instead of console.log in OpenCode plugins
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Create and manage isolated git worktrees safely.
Opinionated workflow for submodule development + PRs + control-center pointer bumps.
Store Apple notarization IDs in Keychain and notarize/staple OpenWork DMGs locally.
Sync control-center master and update submodule pointers safely.
Require every OpenCode plugin to expose get_skills and get_version tools.
Guide for creating effective skills. Use when users want to create or update a skill that extends Claude with specialized knowledge, workflows, or tool integrations.
| name | plugin-logging |
| description | Use client.app.log() instead of console.log in OpenCode plugins |
Use client.app.log() for structured logs inside OpenCode plugins. Do not use console.log().
Why:
service / level)export const MyPlugin = async ({ client }) => {
await client.app.log({
service: "my-plugin",
level: "info",
message: "Plugin initialized",
extra: { foo: "bar" },
});
};
Inside tool({ ... async execute(args, ctx) { ... } }), prefer:
await ctx.client.app.log({
service: "my-plugin",
level: "info",
message: "did thing",
extra: { args },
});
If you’re not sure ctx.client.app.log exists (older plugin API), use a guarded call:
if (ctx?.client?.app?.log) {
await ctx.client.app.log({ service: "my-plugin", level: "info", message: "..." });
}