import type { Span, SpanOptions } from "@opentelemetry/api"; import type { Logger } from "@opentelemetry/api-logs"; import type { TriggerTracer } from "../tracer.js"; import type { Prettify } from "../types/utils.js"; export type LogLevel = "none" | "error" | "warn" | "info" | "debug" | "log"; export declare const logLevels: Array; type TaskLoggerConfig = { logger: Logger; tracer: TriggerTracer; level: LogLevel; maxAttributeCount?: number; }; export type TraceOptions = Prettify; export interface TaskLogger { debug(message: string, properties?: Record): void; log(message: string, properties?: Record): void; info(message: string, properties?: Record): void; warn(message: string, properties?: Record): void; error(message: string, properties?: Record): void; trace(name: string, fn: (span: Span) => Promise, options?: TraceOptions): Promise; startSpan(name: string, options?: TraceOptions): Span; } export declare class OtelTaskLogger implements TaskLogger { #private; private readonly _config; private readonly _level; constructor(_config: TaskLoggerConfig); debug(message: string, properties?: Record): void; log(message: string, properties?: Record): void; info(message: string, properties?: Record): void; warn(message: string, properties?: Record): void; error(message: string, properties?: Record): void; trace(name: string, fn: (span: Span) => Promise, options?: TraceOptions): Promise; startSpan(name: string, options?: TraceOptions): Span; } export declare class NoopTaskLogger implements TaskLogger { debug(): void; log(): void; info(): void; warn(): void; error(): void; trace(name: string, fn: (span: Span) => Promise): Promise; startSpan(): Span; } export {};