nocobase/nocobase · info
ctx.logger.warn()
Error message
ctx.logger.warn()
What it means
Not a thrown error. This is a completion suggestion entry for `ctx.logger.warn()` in the runjs editor's completions catalog, advertising the Pino-style logger available on the runjs context. It is a static data literal, not a runtime call or failure.
Source
Thrown at packages/core/client-v2/src/flow/components/code-editor/runjsCompletions.ts:348
insertText: "await ctx.sql.runById('sql-uid', { type: 'selectRows' })",
boost: 100,
},
{
label: 'ctx.sql.destroy()',
type: 'function',
detail: '(uid: string) => Promise<void>',
insertText: "await ctx.sql.destroy('sql-uid')",
boost: 95,
},
{
label: 'ctx.logger.info()',
type: 'function',
detail: 'Pino logger info',
insertText: "ctx.logger.info({ foo: 1 }, 'message')",
boost: 95,
},
{
label: 'ctx.logger.warn()',
type: 'function',
detail: 'Pino logger warn',
insertText: "ctx.logger.warn({ foo: 1 }, 'message')",
boost: 95,
},
{
label: 'ctx.logger.error()',
type: 'function',
detail: 'Pino logger error',
insertText: "ctx.logger.error({ err }, 'message')",
boost: 95,
},
{
label: 'ctx.logger.debug()',
type: 'function',
detail: 'Pino logger debug',
insertText: "ctx.logger.debug({ foo: 1 }, 'message')",
boost: 95,View on GitHub (pinned to fa42722fef)
Solutions
- No action needed — editor suggestion data only.
- If searching for real runtime warnings, look at useCodeRunner's logger capture instead of the completions file.
Defensive patterns
Strategy: fallback
Prevention
- Treat ctx.logger.warn() here as editor suggestion text only.
- For real runtime logger warnings, inspect useCodeRunner's captured logger output.
When it happens
Trigger: Appears when a user types 'ctx.logger' in the runjs editor and the completion engine surfaces the 'warn' entry with insertText "ctx.logger.warn({ foo: 1 }, 'message')".
Common situations: Developers authoring runjs scripts exploring the logger API surface; log-scrapers mistakenly attributing the label string as an emitted warning.
Related errors
- ctx.logger.warn({ foo: 1 },
- console.warn()
- console.warn(
- [useCodeRunner] restore logger failed:
- Plugin settings menuKey does not exist: menuKey=${options.me
AI-assisted analysis of nocobase/nocobase@fa42722fef (2026-09-01).
Data as JSON: /api/errors/70d62085d826a8f7.
Report an issue: GitHub.