lib/easylogger.js
function(level, text) {

    // If 'text' is object, convert to string
    if (typeof(text) === 'object') text = JSON.stringify(text)

    // If no logger, console output
    if (!logger) {
      switch(level.toLowerCase()) {
        case 'error':
            console.error(text)
            break
        case 'warn':
            console.warn(text)
            break
        case 'info':
            console.info(text)
            break
        case 'debug':
            break
        default:
            if (!text) text = level
            console.log(text)
      }
    } else {

      if (!text) {
        text = level
        level = 'info'
      }
      logger.log(level, text)
      return
    }
  }
function(level, text) {

    // If 'text' is object, convert to string
    if (typeof(text) === 'object') text = JSON.stringify(text)

    // If no logger, console output
    if (!logger) {
      switch(level.toLowerCase()) {
        case 'error':
            console.error(text)
            break
        case 'warn':
            console.warn(text)
            break
        case 'info':
            console.info(text)
            break
        case 'debug':
            break
        default:
            if (!text) text = level
            console.log(text)
      }
    } else {

      if (!text) {
        text = level
        level = 'info'
      }
      logger.log(level, text)
      return
    }
  }
__ Public Methods _____________________________________________________ Print a message