Enable logging in your nuxt.config.ts:
export default defineNuxtConfig({
modules: ['better-convex-nuxt'],
convex: {
url: process.env.CONVEX_URL,
logging: 'info',
},
})
| Option | Type | Default | Description |
|---|---|---|---|
logging | false | 'info' | 'debug' | false | Log level. false = no logs, 'info' = canonical events, 'debug' = verbose details |
convex: {
// false - No logs (production default)
// 'info' - Canonical events (plugin init, auth changes, operations)
// 'debug' - Include debug-level details and timing
logging: process.env.NODE_ENV === 'development' ? 'debug' : false,
}
Logs are styled using ANSI colors (server) and CSS-styled console.log (browser). There is no configurable format option.
[better-convex-nuxt] > plugin:init [ok] client 47ms | url: happy-dog-123.convex.cloud, auth: enabled
[better-convex-nuxt] * auth:change loading -> authenticated | trigger: ssr-hydration, user: abc12345
[better-convex-nuxt] > query [ok] api.users.get 23ms (cached)
[better-convex-nuxt] > mutation [err] api.posts.create 156ms | error: ConvexError "Unauthorized", retriable
Enable logging and look for plugin:init events on both server and client:
[better-convex-nuxt] > plugin:init [ok] server 120ms | url: happy-dog-123.convex.cloud, auth: enabled
[better-convex-nuxt] > plugin:init [ok] client 47ms | url: happy-dog-123.convex.cloud, auth: enabled
If the server init fails, check your CONVEX_URL environment variable.
Track auth state transitions:
[better-convex-nuxt] * auth:change loading -> unauthenticated | trigger: init
[better-convex-nuxt] * auth:change unauthenticated -> authenticated | trigger: login, user: abc12345
Monitor operation timing:
[better-convex-nuxt] > query [ok] api.posts.list 230ms
[better-convex-nuxt] > query [ok] api.posts.list 12ms (cached)
The (cached) indicator shows when data comes from an existing subscription.
Track real-time subscription health:
[better-convex-nuxt] ~ subscription api.posts.list subscribed
[better-convex-nuxt] ~ subscription api.posts.list unsubscribed, updates: 15
Monitor WebSocket connectivity:
[better-convex-nuxt] || connection Connected -> Disconnected
[better-convex-nuxt] || connection Disconnected -> Connected, retry: 2, offline: 3500ms
For production, enable logging only when needed via environment variable:
export default defineNuxtConfig({
convex: {
logging: process.env.CONVEX_LOGGING === 'true' ? 'info' : false,
},
})
logging: 'debug' for maximum visibilitylogging: false by default, enable via environment variable when debugging