Problem to solve
useLogger() returns the plugin-configured logger as-is. To get scoped output (e.g., "logs from createKanban only"), callers either thread the scope manually into every message string or instantiate a fresh logger via createLogger() with a different prefix, which throws away the plugin-level options.
When multiple composables share the same app-level logger (which is the intended default in v0), all output blends together with no easy way to tell which composable emitted what.
Proposed solution
Allow useLogger() to accept an optional scope key that prefixes every message it emits:
app.use(createLoggerPlugin({ prefix: 'v0-prefix-test' }))
const logger = useLogger('createKanban')
logger.warn('....')
// → [v0-prefix-test](createKanban) ....
// or: [v0-prefix-test][createKanban] ....
Behavior:
useLogger() (no arg) — unchanged; uses the plugin's prefix only.
useLogger('key') — wraps the configured logger and appends a per-caller segment after the plugin prefix.
Open detail: bracket form [v0-prefix-test][createKanban] reads consistent with the existing prefix style; paren form [v0-prefix-test](createKanban) reads as a scoped sub-namespace. Either is fine — pick one. Suggest [plugin-prefix][scope-key] for visual consistency.
Implementation sketch: LoggerOptions already carries prefix; this adds a second prefix segment that a thin wrapper around the plugin-shared logger applies on top of the plugin-level one. No new adapter API needed.
Problem to solve
useLogger()returns the plugin-configured logger as-is. To get scoped output (e.g., "logs fromcreateKanbanonly"), callers either thread the scope manually into every message string or instantiate a fresh logger viacreateLogger()with a different prefix, which throws away the plugin-level options.When multiple composables share the same app-level logger (which is the intended default in v0), all output blends together with no easy way to tell which composable emitted what.
Proposed solution
Allow
useLogger()to accept an optional scope key that prefixes every message it emits:Behavior:
useLogger()(no arg) — unchanged; uses the plugin'sprefixonly.useLogger('key')— wraps the configured logger and appends a per-caller segment after the plugin prefix.Open detail: bracket form
[v0-prefix-test][createKanban]reads consistent with the existing prefix style; paren form[v0-prefix-test](createKanban)reads as a scoped sub-namespace. Either is fine — pick one. Suggest[plugin-prefix][scope-key]for visual consistency.Implementation sketch:
LoggerOptionsalready carriesprefix; this adds a second prefix segment that a thin wrapper around the plugin-shared logger applies on top of the plugin-level one. No new adapter API needed.