mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
test: Rename logger
This commit is contained in:
parent
49ba79b14e
commit
d2ef7fa7c0
@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const AWS = require('aws-sdk');
|
||||
const log = require('log').get('aws');
|
||||
const awsLog = require('log').get('aws');
|
||||
const { region, persistentRequest } = require('../misc');
|
||||
|
||||
function createUserPool(name, config = {}) {
|
||||
@ -31,7 +31,7 @@ function deleteUserPool(name) {
|
||||
}
|
||||
|
||||
function findUserPoolByName(name) {
|
||||
log.debug('find cognito user pool by name %s', name);
|
||||
awsLog.debug('find cognito user pool by name %s', name);
|
||||
const cognito = new AWS.CognitoIdentityServiceProvider({ region });
|
||||
|
||||
const params = {
|
||||
@ -44,7 +44,7 @@ function findUserPoolByName(name) {
|
||||
.listUserPools(params)
|
||||
.promise()
|
||||
.then(result => {
|
||||
log.debug('cognito.listUserPools %j', result);
|
||||
awsLog.debug('cognito.listUserPools %j', result);
|
||||
const matches = result.UserPools.filter(pool => pool.Name === name);
|
||||
if (matches.length) {
|
||||
return matches.shift();
|
||||
@ -64,7 +64,7 @@ function describeUserPool(userPoolId) {
|
||||
.describeUserPool({ UserPoolId: userPoolId })
|
||||
.promise()
|
||||
.then(result => {
|
||||
log.debug('cognito.describeUserPool %s %j', userPoolId, result);
|
||||
awsLog.debug('cognito.describeUserPool %s %j', userPoolId, result);
|
||||
return result;
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user