/** * Wraps a service with debug logging for all method calls. * * When debug is enabled, creates a Proxy that intercepts all method calls and: * - Logs method entry with arguments * - Logs method exit with success status and timing * - Logs errors when methods throw * * When debug is disabled (default), returns the original service unchanged * with zero overhead. * * @template T - The service type (must be an object) * @param service - The service instance to wrap * @param serviceName - Name used in log output (e.g., 'OrgInfoService') * @param debug - Whether to enable debug logging (default: false) * @returns The service, wrapped with logging if debug=true * * @example * ```typescript * // Without logging (production) * const service = withServiceDebugLogging(new OrgInfoService(conn), 'OrgInfoService'); * * // With logging (debug mode) * const service = withServiceDebugLogging(new OrgInfoService(conn), 'OrgInfoService', true); * // Calls will log: * // [DEBUG] [SERVICE] OrgInfoService.getOrgIdentity: called → [] * // [DEBUG] [SERVICE] OrgInfoService.getOrgIdentity: result → success=true duration=150ms * ``` */ export declare function withServiceDebugLogging(service: T, serviceName: string, debug?: boolean): T;