How to use the midway-web.logger function in midway-web

To help you get started, we’ve selected a few midway-web examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github midwayjs / sandbox / packages / sandbox-core / src / core / dataSource / core.ts View on Github external
import { provide, async, config, logger, scope, ScopeEnum } from 'midway-web';
import { BaseDataSource } from './base';

@scope(ScopeEnum.Singleton)
@async()
@provide('coreDB')
export class CoreDBDataSource extends BaseDataSource {

  @config('coreDB')
  config;

  @logger('coreDBLogger')
  logger;

  name: string = 'coreDB';
}
github midwayjs / sandbox / packages / sandbox-core / src / core / dataSource / dw.ts View on Github external
import { provide, async, config, logger, scope, ScopeEnum } from 'midway-web';
import { BaseDataSource } from './base';

@scope(ScopeEnum.Singleton)
@async()
@provide('dw')
export class DWDataSource extends BaseDataSource {

  @config('dw')
  config;

  @logger('dwLogger')
  logger;

  name: string = 'dw';
}