Selaa lähdekoodia

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.
master
Saúl Ibarra Corretgé 6 vuotta sitten
vanhempi
commit
f863733dd3

+ 1
- 3
react/features/base/util/helpers.js Näytä tiedosto

@@ -1,7 +1,5 @@
1 1
 // @flow
2 2
 
3
-import logger from './logger';
4
-
5 3
 /**
6 4
  * Creates a deferred object.
7 5
  *
@@ -106,6 +104,6 @@ export function assignIfDefined(target: Object, source: Object) {
106 104
  * @returns {void}
107 105
  */
108 106
 export function reportError(e: Object, msg: string = '') {
109
-    logger.error(msg, e);
107
+    console.error(msg, e);
110 108
     window.onerror && window.onerror(msg, null, null, null, e);
111 109
 }

+ 0
- 7
react/features/base/util/httpUtils.js Näytä tiedosto

@@ -1,7 +1,5 @@
1 1
 import { timeoutPromise } from './timeoutPromise';
2 2
 
3
-import logger from './logger';
4
-
5 3
 /**
6 4
  * The number of milliseconds before deciding that we need retry a fetch request.
7 5
  *
@@ -29,11 +27,6 @@ export function doGetJSON(url, retry) {
29 27
 
30 28
             return jsonify
31 29
                 .then(result => Promise.reject(result));
32
-        })
33
-        .catch(error => {
34
-            logger.error('Error performing get:', url, error);
35
-
36
-            return Promise.reject(error);
37 30
         });
38 31
 
39 32
     if (retry) {

+ 0
- 5
react/features/base/util/logger.js Näytä tiedosto

@@ -1,5 +0,0 @@
1
-// @flow
2
-
3
-import { getLogger } from '../logging/functions';
4
-
5
-export default getLogger('features/base/util');

+ 1
- 3
react/features/base/util/uri.js Näytä tiedosto

@@ -1,7 +1,5 @@
1 1
 // @flow
2 2
 
3
-import logger from './logger';
4
-
5 3
 /**
6 4
  * The app linking scheme.
7 5
  * TODO: This should be read from the manifest files later.
@@ -133,7 +131,7 @@ function _objectToURLParamsArray(obj = {}) {
133 131
             params.push(
134 132
                 `${key}=${encodeURIComponent(JSON.stringify(obj[key]))}`);
135 133
         } catch (e) {
136
-            logger.warn(`Error encoding ${key}: ${e}`);
134
+            console.warn(`Error encoding ${key}: ${e}`);
137 135
         }
138 136
     }
139 137
 

Loading…
Peruuta
Tallenna