import axios from "axios"; import chalk from "chalk"; export function logError(...args: unknown[]) { console.error(chalk.red("ERROR:"), ...args); } export function logWarning(...args: unknown[]) { console.warn(chalk.yellow("WARNING:"), ...args); } export function logSuccess(...args: unknown[]) { console.info(chalk.green("SUCCESS:"), ...args); } export function logInfo(...args: unknown[]) { console.info(chalk.cyan("INFO:"), ...args); } export function printNetworkError(error: unknown) { if (axios.isAxiosError(error)) { logError("Axios error details:", { message: error.message, status: error.response?.status, statusText: error.response?.statusText, data: error.response?.data, url: error.config?.url, }); } else { logError("Unexpected error:", error); } }