ソースを参照

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年前
コミット
f863733dd3

+ 1
- 3
react/features/base/util/helpers.js ファイルの表示

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

+ 0
- 7
react/features/base/util/httpUtils.js ファイルの表示

1
 import { timeoutPromise } from './timeoutPromise';
1
 import { timeoutPromise } from './timeoutPromise';
2
 
2
 
3
-import logger from './logger';
4
-
5
 /**
3
 /**
6
  * The number of milliseconds before deciding that we need retry a fetch request.
4
  * The number of milliseconds before deciding that we need retry a fetch request.
7
  *
5
  *
29
 
27
 
30
             return jsonify
28
             return jsonify
31
                 .then(result => Promise.reject(result));
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
     if (retry) {
32
     if (retry) {

+ 0
- 5
react/features/base/util/logger.js ファイルの表示

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 ファイルの表示

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

読み込み中…
キャンセル
保存