import chalk from 'chalk' ; export const tags = { error : chalk . red ( 'prisma:error' ) , warn : chalk . yellow ( 'prisma:warn' ) , info : chalk . cyan ( 'prisma:info' ) , query : chalk . blue ( 'prisma:query' ) , } ; export const should = { warn : ! process . env . PRISMA_DISABLE_WARNINGS , } ; export function log ( ... data ) { console . log ( ... data ) ; } export function warn ( message , ... optionalParams ) { if ( should . warn ) { console . warn ( `${ tags . warn } ${ message }` , ... optionalParams ) ; } } export function info ( message , ... optionalParams ) { console . info ( `${ tags . info } ${ message }` , ... optionalParams ) ; } export function error ( message , ... optionalParams ) { console . error ( `${ tags . error } ${ message }` , ... optionalParams ) ; } export function query ( message , ... optionalParams ) { console . log ( `${ tags . query } ${ message }` , ... optionalParams ) ; }