let debug = true ; const setDebug = ( next ) => debug = next ; const pad = ( num ) => ( num + '' ) . padStart ( 2 , '0' ) ; const time = ( ) => { const date = new Date ( ) ; const hours = pad ( date . getHours ( ) ) ; const minutes = pad ( date . getMinutes ( ) ) ; const seconds = pad ( date . getSeconds ( ) ) ; return `${ hours }:${ minutes }:${ seconds }` ; } ; const log = ( tag = 'uBO-YT-Log' , ... args ) => debug && console . log ( time ( ) , tag , ... args ) ; const err = ( tag = 'uBO-YT-Log' , ... args ) => debug && console . error ( time ( ) , tag , ... args ) ; export { log , err , setDebug } ; export default log ;