Examples are as follows: The code copy is as follows: var log = new Logger('***.js') if (log.isDebugEnabled()) { log.debug('xxxxx'); }