"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createLogger = createLogger;
function createLogger(info, verbose = false) {
    const prefix = '[TRPC-Nav]';
    return {
        info(message) {
            info.project.projectService.logger.info(`${prefix} ${message}`);
        },
        error(message, error) {
            const errorMessage = error instanceof Error
                ? `${message}: ${error.message}\n${error.stack}`
                : `${message}${error ? `: ${String(error)}` : ''}`;
            info.project.projectService.logger.info(`${prefix} ERROR: ${errorMessage}`);
        },
        debug(message) {
            if (verbose) {
                info.project.projectService.logger.info(`${prefix} DEBUG: ${message}`);
            }
        },
    };
}
//# sourceMappingURL=logger.js.map