Consolidate all console.log into the @0xproject/utils package
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { DoxityDocObj, TypeDocNode } from '@0xproject/react-docs';
|
||||
import { logUtils } from '@0xproject/utils';
|
||||
import findVersions = require('find-versions');
|
||||
import * as _ from 'lodash';
|
||||
import { S3FileObject, VersionToFileName } from 'ts/types';
|
||||
@@ -20,7 +21,7 @@ export const docUtils = {
|
||||
if (response.status !== 200) {
|
||||
// TODO: Show the user an error message when the docs fail to load
|
||||
const errMsg = await response.text();
|
||||
utils.consoleLog(`Failed to load JSON file list: ${response.status} ${errMsg}`);
|
||||
logUtils.log(`Failed to load JSON file list: ${response.status} ${errMsg}`);
|
||||
throw new Error(errMsg);
|
||||
}
|
||||
const responseXML = await response.text();
|
||||
@@ -43,7 +44,7 @@ export const docUtils = {
|
||||
if (response.status !== 200) {
|
||||
// TODO: Show the user an error message when the docs fail to load
|
||||
const errMsg = await response.text();
|
||||
utils.consoleLog(`Failed to load Doc JSON: ${response.status} ${errMsg}`);
|
||||
logUtils.log(`Failed to load Doc JSON: ${response.status} ${errMsg}`);
|
||||
throw new Error(errMsg);
|
||||
}
|
||||
const jsonDocObj = await response.json();
|
||||
|
Reference in New Issue
Block a user