Skip to content
Snippets Groups Projects
logService.js 609 B
Newer Older
  • Learn to ignore specific revisions
  • Hugo NOUTS's avatar
    Hugo NOUTS committed
    import * as loglevelLogger from 'loglevel'
    
    function init() {
      console.log('The logger is initialized')
    }
    
    function debug(errorMessage) {
      console.log(errorMessage)
    }
    
    function log(errorMessage) {
      debug(errorMessage)
    }
    
    function warn(errorMessage) {
      loglevelLogger.warn(errorMessage)
    }
    
    function error(errorMessage) {
      loglevelLogger.error(errorMessage)
    }
    
    /*
    
    function trace(errorMessage) {
      log.trace(errorMessage)
    }
    
    function info(errorMessage) {
      log.info(errorMessage)
    }
    
    function debug(errorMessage) {
      log.debug(errorMessage)
    }
    */
    
    export default {
      init,
      debug,
      log,
      warn,
      error,
    }