useLogger API
Application logging with configurable levels, filtering, and swappable adapters for popular logging libraries.
Related
Explore these related pages for additional context and usage patterns.
Functions
useLogger
(scope?: string | undefined) => LoggerContextConsumes the application logger provided by createLoggerPlugin.
Call with no argument to use the configured logger as-is. Pass a scope key to get a
logger that prefixes every message with a [scope] segment after the plugin prefix —
useful for telling apart output from composables that share the app-level logger. A
scoped logger shares the underlying logger's level, enabled state, and adapter; only
the message prefix differs. A blank scope is treated as no scope.
createLoggerContext
<_E>(_options?: LoggerContextOptions | undefined) => ContextTrinity<_E>createLoggerPlugin
(_options?: LoggerContextOptions | undefined) => PluginOptions
adapter
LoggerAdapter | undefinedlevel
LogLevel | undefinedprefix
string | undefinedenabled
boolean | undefinedMethods
debug
(message: string, ...args: unknown[]) => voidinfo
(message: string, ...args: unknown[]) => voidwarn
(message: string, ...args: unknown[]) => voiderror
(message: string, ...args: unknown[]) => voidtrace
(message: string, ...args: unknown[]) => voidfatal
(message: string, ...args: unknown[]) => voidlevel
(level: LogLevel) => voidcurrent
() => LogLevelenabled
() => booleanenable
() => voiddisable
() => void