const{ Logger, ConsoleColors }=require('logger-nodejs-simple');constlog=newLogger(Logger.LOG_LEVELS.DEBUG);// LogLevels DEBUG is the highest value and will show you everythinglog.log("This is a nice test message for da log XD")log.info("This is a nice test message for da log XD")// theese two will be shown when loglevel min. MODERATElog.warn("This is a nice test message for da log XD")// will be shown when loglevel set to ACCURATElog.debug("This is a nice test message for da log XD")// will only be shown at log level DEBUGlog.out("This is a nice test OUTPUT for da log XD")// will always be shown and not be sent to logger cache ( cannot be uploaded )varerr=newError("This is a nice test Error for da log XD")err.code='SOME_ERR_CODE'log.err(err)// will always be hownlog.upload().then(url=>{log.out("Uploaded Log: "+ConsoleColors.CYAN_BOLD_BRIGHT+url)}).catch(err=>{log.out(ConsoleColors.RED_BOLD_BRIGHT+"Coud not upload logs...")});
Change logLevel
/** * * Possible LogLevels are * NOTHING: -1 * MODERATE: 1 * ACCURATE: 2 * DEBUG: 3 * */log.setLogLevel(Logger.LOG_LEVELS.ARGUMENT);