ws-dottie
Version:
Your friendly TypeScript companion for Washington State transportation APIs - WSDOT and WSF data with smart caching and React Query integration
45 lines • 1.83 kB
TypeScript
/**
* @fileoverview Simplified Logging Utility for WS-Dottie
*
* This module provides a simplified logging interface for WS-Dottie with
* environment-aware debug logging and specialized API call logging.
* Focused on essential functionality used by the core library.
*/
/**
* Simple logging utility for WS-Dottie
*
* Provides basic logging functions with environment-aware debug logging.
* Debug logging is automatically disabled in production environments.
*/
export declare const logger: {
/** Debug logging (disabled in production) */
debug: (message: string) => void;
/** General information logging */
info: (message: string) => void;
/** Warning message logging */
warn: (message: string) => void;
/** Error message logging */
error: (message: string) => void;
};
/**
* Logs API call information in a single line format
*
* Simplified API call logging for the core fetching functionality.
* Used only by fetchCore.ts for basic API operation monitoring.
*
* @param endpoint - The full API endpoint path (will extract endpoint name internally)
* @param params - Parameters being sent to the endpoint
*/
export declare const logApiCall: (endpoint: string, params?: unknown) => void;
/**
* Logs API call results with performance metrics
*
* Simplified API result logging for the core fetching functionality.
* Provides basic performance metrics including duration and response size.
*
* @param jsonData - The parsed JSON response data (will calculate object count internally)
* @param startTime - The timestamp when the request started (will calculate duration internally)
* @param responseSize - Response size in bytes
*/
export declare const logApiResults: (jsonData: unknown, startTime: number, responseSize: number) => void;
//# sourceMappingURL=logger.d.ts.map