import * as debug from "debug" ; import { inspect } from "util" ; remarks public export const log = { info : debug ( "faast:info" ) , minimal : debug ( "faast:minimal" ) , warn : debug ( "faast:warning" ) , gc : debug ( "faast:gc" ) , leaks : debug ( "faast:leaks" ) , calls : debug ( "faast:calls" ) , webpack : debug ( "faast:webpack" ) , provider : debug ( "faast:provider" ) , awssdk : debug ( "faast:awssdk" ) } ; function truncate ( s , len ) { return s . length > len ? `${ s . substr ( 0 , len ) }...` : s ; } export function inspectProvider ( o ) { if ( ! log . provider . enabled ) { return "" ; } return truncate ( inspect ( o , false , 3 ) , 1024 ) ; } log . warn . enabled = true ; log . leaks . enabled = true ;