UNPKG

@dexwox-labs/a2a-server

Version:

TypeScript server implementation for Google's Agent-to-Agent (A2A) protocol - includes Express/WebSocket handlers, request validation and queue management

36 lines 1.27 kB
/** * @module Logger * @description Centralized logging utility for the A2A protocol server * * This module provides a centralized logger instance for the A2A protocol server, * configured with appropriate log levels and formatting based on the environment. * It uses Winston as the underlying logging library. */ import winston from 'winston'; /** * Centralized logger instance for the A2A protocol server * * This logger is configured to output to the console with appropriate formatting * and log levels based on the environment. In production, it logs at the 'info' * level and above, while in development it logs at the 'debug' level and above. * * @example * ```typescript * import logger from './utils/logger'; * * // Log at different levels * logger.debug('Detailed debugging information'); * logger.info('Something noteworthy happened'); * logger.warn('Something concerning happened'); * logger.error('Something went wrong', { error: new Error('Details') }); * ``` */ declare const logger: winston.Logger; /** * Export the logger instance as the default export * * This allows the logger to be imported and used throughout the application * with a simple import statement. */ export default logger; //# sourceMappingURL=logger.d.ts.map