workleap-logging
Installation
SKILL.md
Workleap Logging (@workleap/logging)
A structured logging library for Workleap frontend applications. Provides composable, styled console logging with support for scopes, multiple log levels, and integration with telemetry tools.
The library exports four key types: Logger (base interface), RootLogger (extends Logger with scope support), BrowserConsoleLogger, and CompositeLogger.
Installation
pnpm add @workleap/logging
Core Concepts
Loggers
- BrowserConsoleLogger: Outputs to browser console with styling support
- CompositeLogger: Forwards logs to multiple underlying loggers
- createCompositeLogger(verbose, loggers): Factory function that creates a
CompositeLogger. Whenverboseistrueand no loggers are provided, it adds aBrowserConsoleLogger; otherwise it uses only the loggers you pass (an empty list produces no output). Seereferences/api.mdfor details.