@zxkane/quip-mcp-server
Version:
MCP server for interacting with Quip spreadsheets
119 lines (118 loc) • 3.03 kB
TypeScript
/**
* Log levels
*/
export declare enum LogLevel {
DEBUG = 0,
INFO = 1,
WARN = 2,
ERROR = 3
}
/**
* Logger configuration
*/
export interface LoggerConfig {
/**
* Minimum log level to output
*/
level: LogLevel;
/**
* Whether to include timestamps in log output
*/
timestamps: boolean;
/**
* Whether to output logs as JSON
*/
json: boolean;
/**
* Path to log file (enables file logging when specified)
*/
logFile?: string;
/**
* Maximum size of log file before rotation (default: 10MB)
*/
maxFileSize?: number;
/**
* Maximum number of log files to keep (default: 5)
*/
maxFiles?: number;
}
/**
* Logger class for structured logging using Winston
*/
export declare class Logger {
private logger;
private context;
private originalConsole;
/**
* Create a new logger
*
* @param config Logger configuration
* @param context Additional context to include in all log entries
*/
constructor(config?: Partial<LoggerConfig>, context?: Record<string, any>);
/**
* Create a child logger with additional context
*
* @param context Additional context to include in all log entries
* @returns New logger instance with combined context
*/
child(context: Record<string, any>): Logger;
/**
* Log a message at DEBUG level
*
* @param message Log message
* @param data Additional data to include in the log entry
*/
debug(message: string, data?: Record<string, any>): void;
/**
* Log a message at INFO level
*
* @param message Log message
* @param data Additional data to include in the log entry
*/
info(message: string, data?: Record<string, any>): void;
/**
* Log a message at WARN level
*
* @param message Log message
* @param data Additional data to include in the log entry
*/
warn(message: string, data?: Record<string, any>): void;
/**
* Log a message at ERROR level
*
* @param message Log message
* @param data Additional data to include in the log entry
*/
error(message: string, data?: Record<string, any>): void;
/**
* Log a message at the specified level
*
* @param level Log level
* @param message Log message
* @param data Additional data to include in the log entry
*/
private log;
/**
* Configure global console methods to use this logger
*/
installAsGlobal(): void;
/**
* Reconfigure an existing logger with new settings
*
* @param config Logger configuration
*/
reconfigure(config?: Partial<LoggerConfig>): void;
}
export declare const logger: Logger;
/**
* Configure logger from command line options
*
* @param options Command line options
* @returns Configured logger instance
*/
export declare function configureLogger(options?: {
debug?: boolean;
json?: boolean;
logFile?: string;
}): Logger;