UNPKG

nestjs-temporal-core

Version:

Complete NestJS integration for Temporal.io with auto-discovery, declarative scheduling, enhanced monitoring, and enterprise-ready features

45 lines (44 loc) 2.17 kB
import { LogLevel, LoggerConfig, GlobalLoggerConfig } from '../interfaces'; export declare class TemporalLoggerManager { private static instance; private static readonly DEFAULT_CONFIG; private globalConfig; private readonly loggerCache; static getInstance(): TemporalLoggerManager; configure(config: GlobalLoggerConfig): void; getGlobalConfig(): Readonly<GlobalLoggerConfig>; createLogger(context: string, localConfig?: LoggerConfig): TemporalLogger; private getCacheKey; clearCache(): void; } export declare class TemporalLogger { private static readonly LOG_LEVELS; private static readonly LEVEL_INDICES; private readonly nestLogger; private readonly config; private readonly context; private readonly currentLevelIndex; constructor(context: string, config?: LoggerConfig); private shouldLog; error(message: unknown, trace?: string | Error, context?: string): void; warn(message: unknown, context?: string): void; log(message: unknown, context?: string): void; info(message: unknown, context?: string): void; debug(message: unknown, context?: string): void; verbose(message: unknown, context?: string): void; logExecutionTime(methodName: string, startTime: number, context?: string): void; logWithLevel(level: LogLevel, message: unknown, context?: string): void; createChildLogger(childContext: string, config?: LoggerConfig): TemporalLogger; getConfig(): Readonly<Required<LoggerConfig>>; isEnabled(): boolean; getLogLevel(): LogLevel; getContext(): string; isLevelEnabled(level: LogLevel): boolean; } export declare function createLogger(context: string, config?: LoggerConfig): TemporalLogger; export declare class LoggerUtils { static logServiceInit(logger: TemporalLogger, serviceName: string, config?: unknown): void; static logServiceShutdown(logger: TemporalLogger, serviceName: string): void; static logConnection(logger: TemporalLogger, target: string, success: boolean, error?: Error): void; static logOperation(logger: TemporalLogger, operation: string, success: boolean, details?: string, error?: Error): void; }