diff --git a/packages/renderer-core/src/utils/common.ts b/packages/renderer-core/src/utils/common.ts index 52642c4d4..5ed5bf043 100644 --- a/packages/renderer-core/src/utils/common.ts +++ b/packages/renderer-core/src/utils/common.ts @@ -1,6 +1,6 @@ /* eslint-disable no-console */ /* eslint-disable no-new-func */ -import Debug from 'debug'; +import logger from './logger'; import { isI18nData, RootSchema, NodeSchema, isJSExpression, JSSlot } from '@alilc/lowcode-types'; // moment对象配置 import _moment from 'moment'; @@ -36,8 +36,6 @@ const EXPRESSION_TYPE = { I18N: 'i18n', }; -const debug = Debug('utils:index'); - /** * check if schema passed in is a valid schema * @name isSchema @@ -264,7 +262,7 @@ export function parseExpression(str: any, self: any) { const code = `with($scope || {}) { ${tarStr} }`; return new Function('$scope', code)(self); } catch (err) { - debug('parseExpression.error', err, str, self); + logger.error('parseExpression.error', err, str, self); return undefined; } }