Crawlee Logger Interface (src/logger.ts)

crawlee · packages/types/src/logger.ts · typescript · Apache-2.0
dev-tools, infra, lang:typescript, tag:abstraction, tag:config, tag:extensibility

Defines a configurable logger abstraction for Crawlee, supporting custom implementations (e.g., Winston, Pino) with options like prefix and one‑time messages.

// Source: https://github.com/apify/crawlee | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * Configuration options for Crawlee logger implementations.
 */
export interface CrawleeLoggerOptions {
    /** Prefix to be prepended to each logged line. */
    prefix?: string | null;
}

/**
 * Options for a single log call.
 */
export interface LogOptions {
    /** Log the message only the first time this logger sees that text, ignoring later calls with it. */
    once?: boolean;
}

/**
 * Interface for Crawlee logger implementations.
 * This allows users to inject custom loggers (e.g., Winston, Pino) while maintaining
 * compatibility with the default `@apify/log` implementation.


... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key