How to use the js-logger.debug function in js-logger

To help you get started, we’ve selected a few js-logger examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github archilogic-com / 3dio-js / src / utils / auth / activate-account.js View on Github external
export default function activateAccount (args) {

  var credentials = {
    token: args.token,
    password: args.password
  }

  log.debug('Sending account activation request...')
  return callServices('User.activateAccount', { arguments: credentials })
    .then(function onSuccess (result) {
      log.debug('Account activation request successful.')
      // update session
      return getSession().then(function(session){
        if (session.isAuthenticated) log.debug('Activated user is logged in.')
        return session
      })
    }, function onError (error) {
      log.debug('Account activation failed.', error)
      return Promise.reject(error)
    })
}
github archilogic-com / 3dio-js / src / utils / auth / sign-up.js View on Github external
}, function onSignUpError(error){

    // denied
    log.debug('API: Could not sign up using email "' + credentials.email + '".', error)
    return Promise.reject(error)

  })
github archilogic-com / 3dio-js / src / utils / auth / request-password-reset.js View on Github external
}, function onError(error){

      // denied
      log.debug('API: requesting password reset failed.', error)
      return Promise.reject(error)

    })
github archilogic-com / 3dio-js / src / utils / auth / get-session.js View on Github external
.then(function onSuccess (session) {
      log.debug('API: session data:\n', session)
      // stream session object
      sessionStream.next(session)
      // return result
      return session
    }, function onError (error) {
      log.debug('API: error receiving session data.', error)
github archilogic-com / 3dio-js / src / utils / auth / get-secret-api-key.js View on Github external
export default function getSecretApiKey () {
  log.debug('Sent API request reading secret key ...')
  return callServices('Organization.read').then(function onSuccess (result) {
    if (result.secretApiKey) {
      log.debug('Received secret API key from API')
      return result.secretApiKey
    } else {
      // user has no secret key yet: generate one
      log.debug('User has no secret key. Sent request to generate one.')
      return regenerateSecretApiKey()
    }
  }, function onError (error) {
    log.debug('Error receiving secret API key')
    return Promise.reject(error)
  })
}
github archilogic-com / 3dio-js / src / utils / auth / regenerate-secret-api-key.js View on Github external
return callServices('Organization.generateSecretApiKey').then(function onSuccess(key) {
    log.debug('API: Generating secret API key successful: ', key)
    return key
  }, function onReject(error) {
    log.error('API: Error generating secret key.', error)
github archilogic-com / 3dio-js / src / utils / auth / activate-account.js View on Github external
}, function onError (error) {
      log.debug('Account activation failed.', error)
      return Promise.reject(error)
    })
}
github archilogic-com / 3dio-js / src / utils / auth / regenerate-secret-api-key.js View on Github external
export default function regenerateSecretApiKey () {
  log.debug('Sending API request to generate secret API key ...')
  return callServices('Organization.generateSecretApiKey').then(function onSuccess(key) {
    log.debug('API: Generating secret API key successful: ', key)
    return key
  }, function onReject(error) {
    log.error('API: Error generating secret key.', error)
    return Promise.reject(error)
  })
}