webiny-api-logger-catalog

Catalogs the Logger abstraction for structured logging in Webiny API projects.

8.0k|673|Updated Jan 9, 2018
One-click install
npx skills add https://github.com/webiny/webiny-js --skill webiny-api-logger-catalog
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: webiny-api-logger-catalog
Source: https://github.com/webiny/webiny-js/tree/main/skills/user-skills/generated/api/logger
Command: npx skills add https://github.com/webiny/webiny-js --skill webiny-api-logger-catalog

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers working in the Webiny framework need to know which logging abstraction exists, where to import it from, and where its source lives, without searching the monorepo manually.

Core Features & Use Cases

  • Abstraction Discovery: Lists the Logger abstraction with its exact import path webiny/api/logger and source file location in @webiny/api-core.
  • Structured Logging Reference: Points to the Logger interface supporting multiple log levels for use in API features.
  • Use Case: When implementing a Webiny use case or event handler, look up the Logger import here, read the source file for exact types, and inject structured logging into your feature code.

Quick Start

Ask the assistant to show the Logger abstraction from the Webiny API logger catalog and how to import it into a feature.

Frequently Asked Questions about webiny-api-logger-catalog

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add logging to a Webiny API feature?

Import the Logger abstraction with `import { Logger } from "webiny/api/logger"` and use it in your feature code. Read the source file at @webiny/api-core/features/logger/index.ts for the exact interface and supported log levels.

What logging abstraction does Webiny provide?

Webiny provides a single Logger abstraction offering structured logging with multiple log levels. It is defined in the @webiny/api-core package under features/logger and imported from webiny/api/logger.

Where is the Webiny Logger source code located?

The Logger source is located at @webiny/api-core/features/logger/index.ts in the webiny-js monorepo. Reading this file gives you the exact interface, types, and available log levels.

Can I use the Webiny Logger in event handlers and use cases?

Yes, the Logger abstraction is designed for use across Webiny API features including use cases and event handlers. Refer to the webiny-use-case-pattern or webiny-event-handler-pattern skills for implementation patterns.