studiocms
Version:
Astro Native CMS for AstroDB. Built from the ground up by the Astro community.
13 lines (12 loc) • 671 B
TypeScript
import { Effect } from 'effect';
export declare const logger: {
debug: (message: string) => void;
};
/**
* Builds a debug logger function that logs debug messages conditionally based on the `debug` flag.
* The returned logger function attempts to log the provided message, formatting it with color if supported.
*
* @param debug - A boolean flag indicating whether debug logging is enabled.
* @returns An Effect-wrapped function that logs a debug message if debugging is enabled.
*/
export declare const buildDebugLogger: (debug: boolean) => Effect.Effect<(message: string) => Effect.Effect<void, import("effect/Cause").UnknownException, never>, never, never>;