chore: 移除loggerservice

This commit is contained in:
thinkinggis 2021-08-05 17:29:13 +08:00
parent 5aeddc763b
commit 973b8d1db2
24 changed files with 18 additions and 126 deletions

View File

@ -44,7 +44,6 @@ export * from './services/asset/IFontService';
export * from './services/component/IControlService'; export * from './services/component/IControlService';
export * from './services/component/IMarkerService'; export * from './services/component/IMarkerService';
export * from './services/component/IPopupService'; export * from './services/component/IPopupService';
export * from './services/log/ILogService';
export * from './services/interaction/IInteractionService'; export * from './services/interaction/IInteractionService';
export * from './services/interaction/IPickingService'; export * from './services/interaction/IPickingService';

View File

@ -20,7 +20,6 @@ import { IInteractionService } from './services/interaction/IInteractionService'
import { IPickingService } from './services/interaction/IPickingService'; import { IPickingService } from './services/interaction/IPickingService';
import { ILayerService } from './services/layer/ILayerService'; import { ILayerService } from './services/layer/ILayerService';
import { IStyleAttributeService } from './services/layer/IStyleAttributeService'; import { IStyleAttributeService } from './services/layer/IStyleAttributeService';
import { ILogService } from './services/log/ILogService';
import { ISceneService } from './services/scene/ISceneService'; import { ISceneService } from './services/scene/ISceneService';
import { IShaderModuleService } from './services/shader/IShaderModuleService'; import { IShaderModuleService } from './services/shader/IShaderModuleService';
@ -37,7 +36,6 @@ import InteractionService from './services/interaction/InteractionService';
import PickingService from './services/interaction/PickingService'; import PickingService from './services/interaction/PickingService';
import LayerService from './services/layer/LayerService'; import LayerService from './services/layer/LayerService';
import StyleAttributeService from './services/layer/StyleAttributeService'; import StyleAttributeService from './services/layer/StyleAttributeService';
import LogService from './services/log/LogService';
import SceneService from './services/scene/SceneService'; import SceneService from './services/scene/SceneService';
import ShaderModuleService from './services/shader/ShaderModuleService'; import ShaderModuleService from './services/shader/ShaderModuleService';
@ -83,10 +81,6 @@ container
.bind<IShaderModuleService>(TYPES.IShaderModuleService) .bind<IShaderModuleService>(TYPES.IShaderModuleService)
.to(ShaderModuleService) .to(ShaderModuleService)
.inSingletonScope(); .inSingletonScope();
container
.bind<ILogService>(TYPES.ILogService)
.to(LogService)
.inSingletonScope();
// container // container
// .bind<IFontService>(TYPES.IFontService) // .bind<IFontService>(TYPES.IFontService)
// .to(FontService) // .to(FontService)

View File

@ -4,7 +4,6 @@ import { inject, injectable } from 'inversify';
import 'reflect-metadata'; import 'reflect-metadata';
// @ts-ignore // @ts-ignore
import { TYPES } from '../../types'; import { TYPES } from '../../types';
import { ILogService } from '../log/ILogService';
import { ILngLat, IMapService } from '../map/IMapService'; import { ILngLat, IMapService } from '../map/IMapService';
import { IInteractionService, InteractionEvent } from './IInteractionService'; import { IInteractionService, InteractionEvent } from './IInteractionService';
const DragEventMap: { [key: string]: string } = { const DragEventMap: { [key: string]: string } = {
@ -23,9 +22,6 @@ export default class InteractionService extends EventEmitter
@inject(TYPES.IMapService) @inject(TYPES.IMapService)
private readonly mapService: IMapService; private readonly mapService: IMapService;
@inject(TYPES.ILogService)
private readonly logger: ILogService;
private hammertime: HammerManager; private hammertime: HammerManager;
private lastClickTime: number = 0; private lastClickTime: number = 0;
@ -92,7 +88,6 @@ export default class InteractionService extends EventEmitter
this.hammertime = hammertime; this.hammertime = hammertime;
// TODO: 根据场景注册事件到 L7 canvas 上 // TODO: 根据场景注册事件到 L7 canvas 上
this.logger.debug('add event listeners on canvas');
} }
} }
private removeEventListenerOnMap() { private removeEventListenerOnMap() {

View File

@ -1,6 +0,0 @@
export interface ILogService {
error(message: string): void;
warn(message: string): void;
info(message: string): void;
debug(message: string): void;
}

View File

@ -1,29 +0,0 @@
import { injectable } from 'inversify';
import Probe, { Log } from 'probe.gl';
import { ILogService } from './ILogService';
// !process.env.NODE_ENV === 'production',
const Logger = new Log({ id: 'L7' }).enable(
// @ts-ignore
process.env.NODE_ENV !== 'production',
);
// // 只输出 debug 级别以上的日志信息
Logger.priority = 5;
@injectable()
export default class LogService implements ILogService {
public error(message: string): void {
Logger.error(message)();
}
public warn(message: string): void {
Logger.probe(1, message)();
}
public info(message: string): void {
Logger.info(3, message)();
}
public debug(message: string): void {
Logger.probe(4, message)();
}
}

View File

@ -7,7 +7,6 @@ import {
InteractionEvent, InteractionEvent,
} from '../../interaction/IInteractionService'; } from '../../interaction/IInteractionService';
import { ILayer } from '../../layer/ILayerService'; import { ILayer } from '../../layer/ILayerService';
import { ILogService } from '../../log/ILogService';
import { ILngLat } from '../../map/IMapService'; import { ILngLat } from '../../map/IMapService';
import { gl } from '../gl'; import { gl } from '../gl';
import { IFramebuffer } from '../IFramebuffer'; import { IFramebuffer } from '../IFramebuffer';
@ -22,9 +21,6 @@ import BaseNormalPass from './BaseNormalPass';
export default class PixelPickingPass< export default class PixelPickingPass<
InitializationOptions = {} InitializationOptions = {}
> extends BaseNormalPass<InitializationOptions> { > extends BaseNormalPass<InitializationOptions> {
@inject(TYPES.ILogService)
protected readonly logger: ILogService;
/** /**
* picking framebuffer attributes * picking framebuffer attributes
*/ */
@ -170,7 +166,6 @@ export default class PixelPickingPass<
pickedColors[1] !== 0 || pickedColors[1] !== 0 ||
pickedColors[2] !== 0 pickedColors[2] !== 0
) { ) {
this.logger.debug('picked');
const pickedFeatureIdx = decodePickingColor(pickedColors); const pickedFeatureIdx = decodePickingColor(pickedColors);
const rawFeature = this.layer const rawFeature = this.layer
.getSource() .getSource()

View File

@ -5,7 +5,6 @@ import copyFS from '../../../shaders/post-processing/copy.glsl';
import quadVS from '../../../shaders/post-processing/quad.glsl'; import quadVS from '../../../shaders/post-processing/quad.glsl';
import { TYPES } from '../../../types'; import { TYPES } from '../../../types';
import { ILayer } from '../../layer/ILayerService'; import { ILayer } from '../../layer/ILayerService';
import { ILogService } from '../../log/ILogService';
import { IShaderModuleService } from '../../shader/IShaderModuleService'; import { IShaderModuleService } from '../../shader/IShaderModuleService';
import { gl } from '../gl'; import { gl } from '../gl';
import { IFramebuffer } from '../IFramebuffer'; import { IFramebuffer } from '../IFramebuffer';
@ -43,9 +42,6 @@ export default class TAAPass<InitializationOptions = {}> extends BaseNormalPass<
@inject(TYPES.IShaderModuleService) @inject(TYPES.IShaderModuleService)
protected readonly shaderModuleService: IShaderModuleService; protected readonly shaderModuleService: IShaderModuleService;
@inject(TYPES.ILogService)
protected readonly logger: ILogService;
/** /**
* *
*/ */
@ -193,8 +189,6 @@ export default class TAAPass<InitializationOptions = {}> extends BaseNormalPass<
} }
private doRender(layer: ILayer) { private doRender(layer: ILayer) {
this.logger.debug(`accumulatingId: ${this.accumulatingId}`);
const { clear, getViewportSize, useFramebuffer } = this.rendererService; const { clear, getViewportSize, useFramebuffer } = this.rendererService;
const { width, height } = getViewportSize(); const { width, height } = getViewportSize();
const { jitterScale = 1 } = layer.getLayerConfig(); const { jitterScale = 1 } = layer.getLayerConfig();

View File

@ -22,7 +22,6 @@ import {
} from '../interaction/IInteractionService'; } from '../interaction/IInteractionService';
import { IPickingService } from '../interaction/IPickingService'; import { IPickingService } from '../interaction/IPickingService';
import { ILayer, ILayerService } from '../layer/ILayerService'; import { ILayer, ILayerService } from '../layer/ILayerService';
import { ILogService } from '../log/ILogService';
import { IMapCamera, IMapConfig, IMapService } from '../map/IMapService'; import { IMapCamera, IMapConfig, IMapService } from '../map/IMapService';
import { IRenderConfig, IRendererService } from '../renderer/IRendererService'; import { IRenderConfig, IRendererService } from '../renderer/IRendererService';
import { IShaderModuleService } from '../shader/IShaderModuleService'; import { IShaderModuleService } from '../shader/IShaderModuleService';
@ -55,9 +54,6 @@ export default class Scene extends EventEmitter implements ISceneService {
@inject(TYPES.IControlService) @inject(TYPES.IControlService)
private readonly controlService: IControlService; private readonly controlService: IControlService;
@inject(TYPES.ILogService)
private readonly logger: ILogService;
@inject(TYPES.IGlobalConfigService) @inject(TYPES.IGlobalConfigService)
private readonly configService: IGlobalConfigService; private readonly configService: IGlobalConfigService;
@ -184,7 +180,6 @@ export default class Scene extends EventEmitter implements ISceneService {
InteractionEvent.Drag, InteractionEvent.Drag,
this.addSceneEvent.bind(this), this.addSceneEvent.bind(this),
); );
this.logger.debug(`map ${this.id} loaded`);
}); });
/** /**
@ -220,11 +215,10 @@ export default class Scene extends EventEmitter implements ISceneService {
.matchMedia('screen and (-webkit-min-device-pixel-ratio: 1.5)') .matchMedia('screen and (-webkit-min-device-pixel-ratio: 1.5)')
.addListener(this.handleWindowResized); .addListener(this.handleWindowResized);
} else { } else {
this.logger.error('容器 id 不存在');
console.error('容器 id 不存在');
} }
this.pickingService.init(this.id); this.pickingService.init(this.id);
this.logger.debug(`scene ${this.id} renderer loaded`);
}); });
// TODOinit worker, fontAtlas... // TODOinit worker, fontAtlas...
@ -235,7 +229,6 @@ export default class Scene extends EventEmitter implements ISceneService {
} }
public addLayer(layer: ILayer) { public addLayer(layer: ILayer) {
this.logger.debug(`add layer ${layer.name} to scene ${this.id}`);
this.layerService.add(layer); this.layerService.add(layer);
this.render(); this.render();
} }
@ -259,7 +252,6 @@ export default class Scene extends EventEmitter implements ISceneService {
await document.fonts.load(`24px ${this.fontFamily}`, 'L7text'); await document.fonts.load(`24px ${this.fontFamily}`, 'L7text');
} }
// FIXME: 初始化 marker 容器,可以放到 map 初始化方法中? // FIXME: 初始化 marker 容器,可以放到 map 初始化方法中?
this.logger.info(' render inited');
this.layerService.initLayers(); this.layerService.initLayers();
this.controlService.addControls(); this.controlService.addControls();
this.loaded = true; this.loaded = true;
@ -271,7 +263,6 @@ export default class Scene extends EventEmitter implements ISceneService {
this.layerService.renderLayers(); this.layerService.renderLayers();
// 组件需要等待layer 初始化完成之后添加 // 组件需要等待layer 初始化完成之后添加
this.logger.debug(`scene ${this.id} render`);
this.rendering = false; this.rendering = false;
} }

View File

@ -7,7 +7,6 @@ const TYPES = {
ILayerService: Symbol.for('ILayerService'), ILayerService: Symbol.for('ILayerService'),
ILayerMappingService: Symbol.for('ILayerMappingService'), ILayerMappingService: Symbol.for('ILayerMappingService'),
ILayerStyleService: Symbol.for('ILayerStyleService'), ILayerStyleService: Symbol.for('ILayerStyleService'),
ILogService: Symbol.for('ILogService'),
IMapService: Symbol.for('IMapService'), IMapService: Symbol.for('IMapService'),
IMarkerService: Symbol.for('IMarkerService'), IMarkerService: Symbol.for('IMarkerService'),
IPopupService: Symbol.for('PopupService'), IPopupService: Symbol.for('PopupService'),

View File

@ -19,7 +19,6 @@ import {
ILayerModelInitializationOptions, ILayerModelInitializationOptions,
ILayerPlugin, ILayerPlugin,
ILayerService, ILayerService,
ILogService,
IMapService, IMapService,
IModel, IModel,
IModelInitializationOptions, IModelInitializationOptions,
@ -112,9 +111,6 @@ export default class BaseLayer<ChildLayerStyleOptions = {}> extends EventEmitter
public layerModel: ILayerModel; public layerModel: ILayerModel;
@lazyInject(TYPES.ILogService)
protected readonly logger: ILogService;
@lazyInject(TYPES.IGlobalConfigService) @lazyInject(TYPES.IGlobalConfigService)
protected readonly configService: IGlobalConfigService; protected readonly configService: IGlobalConfigService;

View File

@ -4,7 +4,6 @@ import {
IEncodeFeature, IEncodeFeature,
ILayer, ILayer,
ILayerPlugin, ILayerPlugin,
ILogService,
IModel, IModel,
IModelUniform, IModelUniform,
IRasterParserDataItem, IRasterParserDataItem,

View File

@ -5,7 +5,6 @@ import {
ILayer, ILayer,
ILayerPlugin, ILayerPlugin,
ILngLat, ILngLat,
ILogService,
IMapService, IMapService,
IParseDataItem, IParseDataItem,
IStyleAttribute, IStyleAttribute,
@ -22,9 +21,6 @@ export default class DataMappingPlugin implements ILayerPlugin {
@inject(TYPES.IGlobalConfigService) @inject(TYPES.IGlobalConfigService)
private readonly configService: IGlobalConfigService; private readonly configService: IGlobalConfigService;
@inject(TYPES.ILogService)
private readonly logger: ILogService;
@inject(TYPES.IMapService) @inject(TYPES.IMapService)
private readonly mapService: IMapService; private readonly mapService: IMapService;
@ -80,7 +76,6 @@ export default class DataMappingPlugin implements ILayerPlugin {
), ),
); );
} }
this.logger.debug('remapping finished');
// 处理文本更新 // 处理文本更新
layer.emit('remapping', null); layer.emit('remapping', null);
} }

View File

@ -2,7 +2,6 @@ import {
IGlobalConfigService, IGlobalConfigService,
ILayer, ILayer,
ILayerPlugin, ILayerPlugin,
ILogService,
IScale, IScale,
IScaleOptions, IScaleOptions,
IStyleAttribute, IStyleAttribute,
@ -41,10 +40,6 @@ const scaleMap = {
export default class FeatureScalePlugin implements ILayerPlugin { export default class FeatureScalePlugin implements ILayerPlugin {
@inject(TYPES.IGlobalConfigService) @inject(TYPES.IGlobalConfigService)
private readonly configService: IGlobalConfigService; private readonly configService: IGlobalConfigService;
@inject(TYPES.ILogService)
private readonly logger: ILogService;
// key = field_attribute name // key = field_attribute name
private scaleCache: { private scaleCache: {
[field: string]: IStyleScale; [field: string]: IStyleScale;
@ -97,7 +92,6 @@ export default class FeatureScalePlugin implements ILayerPlugin {
); );
if (attributesToRescale.length) { if (attributesToRescale.length) {
this.caculateScalesForAttributes(attributesToRescale, dataArray); this.caculateScalesForAttributes(attributesToRescale, dataArray);
this.logger.debug('rescale finished');
} }
} }
}); });

View File

@ -4,7 +4,6 @@ import {
IEncodeFeature, IEncodeFeature,
ILayer, ILayer,
ILayerPlugin, ILayerPlugin,
ILogService,
IStyleAttributeService, IStyleAttributeService,
TYPES, TYPES,
} from '@antv/l7-core'; } from '@antv/l7-core';
@ -16,9 +15,6 @@ import 'reflect-metadata';
*/ */
@injectable() @injectable()
export default class RegisterStyleAttributePlugin implements ILayerPlugin { export default class RegisterStyleAttributePlugin implements ILayerPlugin {
@inject(TYPES.ILogService)
private readonly logger: ILogService;
public apply( public apply(
layer: ILayer, layer: ILayer,
{ {

View File

@ -1,7 +1,6 @@
import { import {
ILayer, ILayer,
ILayerPlugin, ILayerPlugin,
ILogService,
IStyleAttributeService, IStyleAttributeService,
TYPES, TYPES,
} from '@antv/l7-core'; } from '@antv/l7-core';
@ -13,9 +12,6 @@ import 'reflect-metadata';
*/ */
@injectable() @injectable()
export default class UpdateStyleAttributePlugin implements ILayerPlugin { export default class UpdateStyleAttributePlugin implements ILayerPlugin {
@inject(TYPES.ILogService)
private readonly logger: ILogService;
public apply( public apply(
layer: ILayer, layer: ILayer,
{ {
@ -66,9 +62,6 @@ export default class UpdateStyleAttributePlugin implements ILayerPlugin {
attribute.featureRange.endIndex, attribute.featureRange.endIndex,
); );
attribute.needRegenerateVertices = false; attribute.needRegenerateVertices = false;
this.logger.debug(
`regenerate vertex attributes: ${attribute.name} finished`,
);
}); });
} }
@ -90,7 +83,6 @@ export default class UpdateStyleAttributePlugin implements ILayerPlugin {
attribute.featureRange.endIndex, attribute.featureRange.endIndex,
); );
attribute.needRegenerateVertices = false; attribute.needRegenerateVertices = false;
this.logger.debug(`init vertex attributes: ${attribute.name} finished`);
}); });
} }
} }

View File

@ -5,7 +5,6 @@ import {
ILayer, ILayer,
ILayerModel, ILayerModel,
ILayerPlugin, ILayerPlugin,
ILogService,
IModel, IModel,
IStyleAttributeService, IStyleAttributeService,
lazyInject, lazyInject,

View File

@ -4,7 +4,6 @@ import {
IEncodeFeature, IEncodeFeature,
ILayer, ILayer,
ILayerPlugin, ILayerPlugin,
ILogService,
IModel, IModel,
IModelUniform, IModelUniform,
IRasterParserDataItem, IRasterParserDataItem,

View File

@ -4,7 +4,6 @@ import {
IEncodeFeature, IEncodeFeature,
ILayer, ILayer,
ILayerPlugin, ILayerPlugin,
ILogService,
IModelUniform, IModelUniform,
IRasterParserDataItem, IRasterParserDataItem,
IStyleAttributeService, IStyleAttributeService,

View File

@ -1,6 +1,5 @@
import { import {
IGlobalConfigService, IGlobalConfigService,
ILogService,
IMapConfig, IMapConfig,
IMapService, IMapService,
IMapWrapper, IMapWrapper,
@ -9,9 +8,6 @@ import {
} from '@antv/l7-core'; } from '@antv/l7-core';
import { Container } from 'inversify'; import { Container } from 'inversify';
export default class BaseMapWrapper<RawMap> implements IMapWrapper { export default class BaseMapWrapper<RawMap> implements IMapWrapper {
@lazyInject(TYPES.ILogService)
protected readonly logger: ILogService;
@lazyInject(TYPES.IGlobalConfigService) @lazyInject(TYPES.IGlobalConfigService)
protected readonly configService: IGlobalConfigService; protected readonly configService: IGlobalConfigService;

View File

@ -9,7 +9,6 @@ import {
ICoordinateSystemService, ICoordinateSystemService,
IGlobalConfigService, IGlobalConfigService,
ILngLat, ILngLat,
ILogService,
IMapConfig, IMapConfig,
IMapService, IMapService,
IMercator, IMercator,
@ -65,9 +64,6 @@ export default class AMapService
@inject(TYPES.IGlobalConfigService) @inject(TYPES.IGlobalConfigService)
private readonly configService: IGlobalConfigService; private readonly configService: IGlobalConfigService;
@inject(TYPES.ILogService)
private readonly logger: ILogService;
@inject(TYPES.MapConfig) @inject(TYPES.MapConfig)
private readonly config: Partial<IMapConfig>; private readonly config: Partial<IMapConfig>;
@ -362,7 +358,7 @@ export default class AMapService
}; };
if (!amapLoaded && !mapInstance) { if (!amapLoaded && !mapInstance) {
if (token === AMAP_API_KEY) { if (token === AMAP_API_KEY) {
this.logger.warn(this.configService.getSceneWarninfo('MapToken')); console.warn(this.configService.getSceneWarninfo('MapToken'));
} }
amapLoaded = true; amapLoaded = true;
plugin.push('Map3D'); plugin.push('Map3D');

View File

@ -9,7 +9,6 @@ import {
ICoordinateSystemService, ICoordinateSystemService,
IGlobalConfigService, IGlobalConfigService,
ILngLat, ILngLat,
ILogService,
IMapConfig, IMapConfig,
IMapService, IMapService,
IMercator, IMercator,
@ -74,9 +73,6 @@ export default class AMapService
@inject(TYPES.IGlobalConfigService) @inject(TYPES.IGlobalConfigService)
private readonly configService: IGlobalConfigService; private readonly configService: IGlobalConfigService;
@inject(TYPES.ILogService)
private readonly logger: ILogService;
@inject(TYPES.MapConfig) @inject(TYPES.MapConfig)
private readonly config: Partial<IMapConfig>; private readonly config: Partial<IMapConfig>;
@ -460,7 +456,7 @@ export default class AMapService
this.viewport = new Viewport(); this.viewport = new Viewport();
if (!amapLoaded && !mapInstance) { if (!amapLoaded && !mapInstance) {
if (token === AMAP_API_KEY) { if (token === AMAP_API_KEY) {
this.logger.warn(this.configService.getSceneWarninfo('MapToken')); console.warn(this.configService.getSceneWarninfo('MapToken'));
} }
amapLoaded = true; amapLoaded = true;
plugin.push('Map3D'); plugin.push('Map3D');

View File

@ -7,7 +7,6 @@ import {
ICoordinateSystemService, ICoordinateSystemService,
IGlobalConfigService, IGlobalConfigService,
ILngLat, ILngLat,
ILogService,
IMapConfig, IMapConfig,
IMapService, IMapService,
IMercator, IMercator,
@ -50,8 +49,6 @@ export default class L7MapService implements IMapService<Map> {
@inject(TYPES.IGlobalConfigService) @inject(TYPES.IGlobalConfigService)
private readonly configService: IGlobalConfigService; private readonly configService: IGlobalConfigService;
@inject(TYPES.ILogService)
private readonly logger: ILogService;
@inject(TYPES.ICoordinateSystemService) @inject(TYPES.ICoordinateSystemService)
private readonly coordinateSystemService: ICoordinateSystemService; private readonly coordinateSystemService: ICoordinateSystemService;

View File

@ -7,7 +7,6 @@ import {
ICoordinateSystemService, ICoordinateSystemService,
IGlobalConfigService, IGlobalConfigService,
ILngLat, ILngLat,
ILogService,
IMapConfig, IMapConfig,
IMapService, IMapService,
IMercator, IMercator,
@ -57,8 +56,6 @@ export default class MapboxService
@inject(TYPES.IGlobalConfigService) @inject(TYPES.IGlobalConfigService)
private readonly configService: IGlobalConfigService; private readonly configService: IGlobalConfigService;
@inject(TYPES.ILogService)
private readonly logger: ILogService;
@inject(TYPES.ICoordinateSystemService) @inject(TYPES.ICoordinateSystemService)
private readonly coordinateSystemService: ICoordinateSystemService; private readonly coordinateSystemService: ICoordinateSystemService;
@ -309,7 +306,7 @@ export default class MapboxService
// 判断全局 mapboxgl 对象的加载 // 判断全局 mapboxgl 对象的加载
if (!mapInstance && !window.mapboxgl) { if (!mapInstance && !window.mapboxgl) {
// 用户有时传递进来的实例是继承于 mapbox 实例化的,不一定是 mapboxgl 对象。 // 用户有时传递进来的实例是继承于 mapbox 实例化的,不一定是 mapboxgl 对象。
this.logger.error(this.configService.getSceneWarninfo('SDK')); console.error(this.configService.getSceneWarninfo('SDK'));
} }
if ( if (
@ -318,7 +315,8 @@ export default class MapboxService
!window.mapboxgl.accessToken && !window.mapboxgl.accessToken &&
!mapInstance // 如果用户传递了 mapInstance应该不去干预实例的 accessToken。 !mapInstance // 如果用户传递了 mapInstance应该不去干预实例的 accessToken。
) { ) {
this.logger.warn(this.configService.getSceneWarninfo('MapToken'));
console.warn(this.configService.getSceneWarninfo('MapToken'));
} }
// 判断是否设置了 accessToken // 判断是否设置了 accessToken

View File

@ -15,14 +15,22 @@
"jsx-double" "jsx-double"
], ],
"no-bitwise": false, "no-bitwise": false,
"no-console": [true, "log"],
"object-literal-sort-keys": false, "object-literal-sort-keys": false,
"no-implicit-dependencies": [true, "dev"] "no-implicit-dependencies": [
true,
"dev"
]
}, },
"globals": { "globals": {
"AMap": true "AMap": true
}, },
"linterOptions": { "linterOptions": {
"exclude": ["**/*.d.ts", "**/data/*.ts", "**/*.{test,story}.ts{,x}", "node_modules/**"] "exclude": [
"**/*.d.ts",
"**/data/*.ts",
"**/*.{test,story}.ts{,x}",
"node_modules/**"
]
} }
} }