1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-23 17:02:25 +03:00

Console logging to loglevel

This commit is contained in:
jkasun
2019-05-19 09:29:40 +05:30
parent 56062e8e4e
commit a73dabcb67
41 changed files with 248 additions and 214 deletions

View File

@@ -22,6 +22,7 @@ import Promise from 'bluebird';
const parseContentType = require('content-type').parse;
const utils = require("./utils");
import logger from '../src/logger';
// we use our own implementation of setTimeout, so that if we get suspended in
// the middle of a /sync, we cancel the sync as soon as we awake, rather than
@@ -175,7 +176,7 @@ module.exports.MatrixHttpApi.prototype = {
if (global.XMLHttpRequest) {
rawResponse = false;
} else {
console.warn(
logger.warn(
"Returning the raw JSON from uploadContent(). Future " +
"versions of the js-sdk will change this default, to " +
"return the parsed object. Set opts.rawResponse=false " +
@@ -188,7 +189,7 @@ module.exports.MatrixHttpApi.prototype = {
let onlyContentUri = opts.onlyContentUri;
if (!rawResponse && onlyContentUri === undefined) {
if (global.XMLHttpRequest) {
console.warn(
logger.warn(
"Returning only the content-uri from uploadContent(). " +
"Future versions of the js-sdk will change this " +
"default, to return the whole response object. Set " +