base/util: don't use the Grand Unified Logger
There are just a couple of logs in this feature, and it's included in bundles like external_api, which would bloat it due to cascaded dependencis.
This commit is contained in:
parent
2ccd4968a4
commit
f863733dd3
|
@ -1,7 +1,5 @@
|
|||
// @flow
|
||||
|
||||
import logger from './logger';
|
||||
|
||||
/**
|
||||
* Creates a deferred object.
|
||||
*
|
||||
|
@ -106,6 +104,6 @@ export function assignIfDefined(target: Object, source: Object) {
|
|||
* @returns {void}
|
||||
*/
|
||||
export function reportError(e: Object, msg: string = '') {
|
||||
logger.error(msg, e);
|
||||
console.error(msg, e);
|
||||
window.onerror && window.onerror(msg, null, null, null, e);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import { timeoutPromise } from './timeoutPromise';
|
||||
|
||||
import logger from './logger';
|
||||
|
||||
/**
|
||||
* The number of milliseconds before deciding that we need retry a fetch request.
|
||||
*
|
||||
|
@ -29,11 +27,6 @@ export function doGetJSON(url, retry) {
|
|||
|
||||
return jsonify
|
||||
.then(result => Promise.reject(result));
|
||||
})
|
||||
.catch(error => {
|
||||
logger.error('Error performing get:', url, error);
|
||||
|
||||
return Promise.reject(error);
|
||||
});
|
||||
|
||||
if (retry) {
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
// @flow
|
||||
|
||||
import { getLogger } from '../logging/functions';
|
||||
|
||||
export default getLogger('features/base/util');
|
|
@ -1,7 +1,5 @@
|
|||
// @flow
|
||||
|
||||
import logger from './logger';
|
||||
|
||||
/**
|
||||
* The app linking scheme.
|
||||
* TODO: This should be read from the manifest files later.
|
||||
|
@ -133,7 +131,7 @@ function _objectToURLParamsArray(obj = {}) {
|
|||
params.push(
|
||||
`${key}=${encodeURIComponent(JSON.stringify(obj[key]))}`);
|
||||
} catch (e) {
|
||||
logger.warn(`Error encoding ${key}: ${e}`);
|
||||
console.warn(`Error encoding ${key}: ${e}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue