Guide for @workleap/logging, a structured logging library for Workleap frontend TypeScript applications. Use this skill when: (1) Setting up or configuring @workleap/logging loggers (BrowserConsoleLogger, CompositeLogger) (2) Using @workleap/logging API: log levels, chained segments, scopes, styled output (3) Composing or filtering loggers for multi-destination logging (LogRocket, telemetry) (4) Working with Squide's useLogger hook alongside @workleap/logging (5) Reviewing PRs or troubleshooting logging code in Workleap TypeScript projects This skill also applies when the user discusses frontend logging, console logging, or structured logging in a Workleap context without naming the package directly.
Ships in workleap-logging. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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.
pnpm add @workleap/logging
CompositeLogger. When verbose is true and no loggers are provided, it adds a BrowserConsoleLogger; otherwise it uses only the loggers you pass (an empty list produces no output). See references/api.md for details.debug - Detailed diagnostic info for developmentinformation - General application flow eventswarning - Non-critical issues needing attentionerror - Failures that prevent functionality from completing (triggers alerting in production)critical - Severe errors risking data integrityScopes buffer log entries in memory and output them as a grouped block when .end() is called. This makes it easier to trace multi-step operations in noisy console output.
const scope = logger.startScope("User signup");
scope.debug("Validating...");
scope.information("Signup complete");
scope.end();
The Logger interface doesn't expose startScope because scoping is a root-level concern. When using Squide's useLogger(), the return type is Logger, so cast to RootLogger to access scope methods:
import { useLogger } from "@squide/firefly";
import type { RootLogger } from "@workleap/logging";
const logger = useLogger();
(logger as RootLogger).startScope("User signup");
Build complex log entries by chaining segments. A chain without a terminal log level method (.debug(), .error(), etc.) silently produces no output — this is the most common source of missing logs.
logger
.withText("Processing order")
.withObject({ orderId: 123 })
.withError(new Error("Failed"))
.error();
// Output: [error] Processing order { orderId: 123 } Error: Failed
.debug(), .error(), etc. silently produce no output..end() is called. Without it, the logs are silently lost.warning for failures: Reserve error for failures — warning is for non-critical issues. This distinction matters because production alerting and log filtering depend on accurate severity.withObject() for relevant data and withError() for exceptions, error logs lack the information needed to reproduce issues in production.references/api.md — Read when you need constructor signatures, the full method list (styled text, line breaks, withObject, withError), scope lifecycle API, or createCompositeLogger details.references/patterns.md — Read when setting up a logger from scratch, integrating with LogRocket, implementing scoped logging for features/operations, or conducting a PR review of logging code.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
/workleap-logging:workleap-loggingfrom workleap-logging
npx claudepluginhub workleap/wl-logging --plugin workleap-logging