mirror of
https://github.com/apache/superset.git
synced 2026-05-12 11:25:56 +00:00
chore: migrate console logs to logging service (#10608)
This commit is contained in:
@@ -23,6 +23,7 @@ import { bindActionCreators } from 'redux';
|
||||
import { connect } from 'react-redux';
|
||||
import styled from '@superset-ui/style';
|
||||
import { t } from '@superset-ui/translation';
|
||||
import { logging } from '@superset-ui/core';
|
||||
|
||||
import ExploreChartPanel from './ExploreChartPanel';
|
||||
import ControlPanelsContainer from './ControlPanelsContainer';
|
||||
@@ -247,8 +248,7 @@ class ExploreViewContainer extends React.Component {
|
||||
history.pushState(payload, title, longUrl);
|
||||
}
|
||||
} catch (e) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(
|
||||
logging.warn(
|
||||
'Failed at altering browser history',
|
||||
payload,
|
||||
title,
|
||||
|
||||
@@ -21,6 +21,7 @@ import PropTypes from 'prop-types';
|
||||
|
||||
import { t } from '@superset-ui/translation';
|
||||
import { SupersetClient } from '@superset-ui/connection';
|
||||
import { logging } from '@superset-ui/core';
|
||||
|
||||
import OnPasteSelect from 'src/components/Select/OnPasteSelect';
|
||||
|
||||
@@ -127,8 +128,7 @@ export default class AdhocFilterControl extends React.Component {
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
/* eslint-disable no-debugger, no-console */
|
||||
console.error('fetch extra_table_metadata:', error.statusText);
|
||||
logging.error('fetch extra_table_metadata:', error.statusText);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
import React from 'react';
|
||||
import { SupersetClient } from '@superset-ui/connection';
|
||||
import { logging } from '@superset-ui/core';
|
||||
|
||||
import { isEqual } from 'lodash';
|
||||
|
||||
@@ -67,7 +68,7 @@ export default function withVerification(
|
||||
this.setState({ validOptions: new Set(json) || new Set() });
|
||||
}
|
||||
})
|
||||
.catch(error => console.log(error));
|
||||
.catch(error => logging.log(error));
|
||||
|
||||
if (!this.state.hasRunVerification) {
|
||||
this.setState({ hasRunVerification: true });
|
||||
|
||||
Reference in New Issue
Block a user