use Logger instead of console (#1417)

This commit is contained in:
Denys Vuika
2020-04-17 12:25:25 +01:00
committed by GitHub
parent dda83d27a0
commit cfb9c4bca9
22 changed files with 92 additions and 66 deletions

View File

@@ -24,13 +24,14 @@
*/
import { RepoApi } from '../repo-api';
import { Logger } from '@alfresco/adf-testing';
import { Utils } from '../../../../utilities/utils';
import { TrashcanApi as AdfTrashcanApi} from '@alfresco/js-api';
export class TrashcanApi extends RepoApi {
trashcanApi = new AdfTrashcanApi(this.alfrescoJsApi);
constructor(username?, password?) {
constructor(username?: string, password?: string) {
super(username, password);
}
@@ -92,8 +93,8 @@ export class TrashcanApi extends RepoApi {
return await Utils.retryCall(deletedFiles);
} catch (error) {
console.log(`${this.constructor.name} ${this.waitForApi.name} catch: `);
console.log(`\tExpected: ${data.expect} items, but found ${error}`);
Logger.error(`${this.constructor.name} ${this.waitForApi.name} catch: `);
Logger.error(`\tExpected: ${data.expect} items, but found ${error}`);
}
}
}