@safaricom-mxl/nextjs-turbo-redis-cache
Version:
Next.js redis cache handler
31 lines (29 loc) • 655 B
text/typescript
export function debug(
_color:
| "red"
| "blue"
| "green"
| "yellow"
| "cyan"
| "white"
| "none" = "none",
..._args: unknown[]
): void {
const _colorCode = {
red: "\x1b[31m",
blue: "\x1b[34m",
green: "\x1b[32m",
yellow: "\x1b[33m",
cyan: "\x1b[36m",
white: "\x1b[37m",
none: "",
};
const isEnabled = process.env.DEBUG_CACHE_HANDLER;
if (isEnabled && isEnabled !== "false" && isEnabled !== "0") {
}
}
export function debugVerbose(..._args: unknown[]) {
const isEnabled = process.env.DEBUG_CACHE_HANDLER_VERBOSE;
if (isEnabled && isEnabled !== "false" && isEnabled !== "0") {
}
}