chore: migrate console logs to logging service (#10608)

This commit is contained in:
Evan Rusackas
2020-08-16 20:20:47 -07:00
committed by GitHub
parent ca9ca99510
commit 08211953b2
7 changed files with 13 additions and 10 deletions

View File

@@ -20,6 +20,7 @@ import PropTypes from 'prop-types';
import React from 'react';
import { Alert } from 'react-bootstrap';
import styled from '@superset-ui/style';
import { logging } from '@superset-ui/core';
import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags';
import { Logger, LOG_ACTIONS_RENDER_CHART } from '../logger/LogUtils';
@@ -131,7 +132,7 @@ class Chart extends React.PureComponent {
handleRenderContainerFailure(error, info) {
const { actions, chartId } = this.props;
console.warn(error); // eslint-disable-line
logging.warn(error);
actions.chartRenderingFailed(
error.toString(),
chartId,

View File

@@ -20,6 +20,7 @@ import { snakeCase } from 'lodash';
import PropTypes from 'prop-types';
import React from 'react';
import { SuperChart } from '@superset-ui/chart';
import { logging } from '@superset-ui/core';
import { Logger, LOG_ACTIONS_RENDER_CHART } from '../logger/LogUtils';
const propTypes = {
@@ -124,7 +125,7 @@ class ChartRenderer extends React.Component {
handleRenderFailure(error, info) {
const { actions, chartId } = this.props;
console.warn(error); // eslint-disable-line
logging.warn(error);
actions.chartRenderingFailed(
error.toString(),
chartId,