當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript LoggerInstance.info方法代碼示例

本文整理匯總了TypeScript中winston.LoggerInstance.info方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript LoggerInstance.info方法的具體用法?TypeScript LoggerInstance.info怎麽用?TypeScript LoggerInstance.info使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在winston.LoggerInstance的用法示例。


在下文中一共展示了LoggerInstance.info方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: init

  async init(): Promise<boolean> {
    this.logger.info('Initializing Game Handler Service Start');

    this.logger.info('Initializing Game Handler Service End');

    return true;
  }
開發者ID:cuponthetop,項目名稱:bg-hub,代碼行數:7,代碼來源:game-handler.service.ts

示例2: init

  async init(): Promise<boolean> {
    this.logger.info('Initializing Locale Command Start');

    await this.db.createTable(COMMON_TABLES.LOCALE, false);

    this.logger.info('Initializing Locale Command End');

    return true;
  }
開發者ID:cuponthetop,項目名稱:bg-hub,代碼行數:9,代碼來源:locale.command.ts

示例3: init

  async init(): Promise<boolean> {
    this.logger.info('Initializing Game Command Start');

    await this.db.createTable(GAME_TABLES.GAME, false);
    await this.db.createTable(GAME_TABLES.RELATION, false);

    this.logger.info('Initializing Game Command End');

    return true;
  }
開發者ID:cuponthetop,項目名稱:bg-hub,代碼行數:10,代碼來源:game.command.ts

示例4: init

  async init(): Promise<boolean> {
    this.logger.info('Initializing User Command Start');

    await this.db.createTable(USER_TABLES.USER, false);
    await this.db.createTable(USER_TABLES.HISTORY, false);
    await this.db.createTable(USER_TABLES.RESULT, false);
    await this.db.createTable(USER_TABLES.GROUP, false);
    await this.db.createTable(USER_TABLES.GAME_LIST, false);
    await this.db.createTable(USER_TABLES.GROUP_MEMBER, false);

    this.logger.info('Initializing User Command End');

    return true;
  }
開發者ID:cuponthetop,項目名稱:bg-hub,代碼行數:14,代碼來源:user.command.ts

示例5: constructor

 /**
  * The constructor.
  */
 constructor() {
     this.logger = LoggerUtil.build();
     this.ocrProcessingService = OcrProcessingServiceFactory.build();
     this.redisClient = RedisClientFactory.build();
     this.logger.info(`Application "OCR worker" initialized.`);
     this.registerProcessTerminationEvent();
 }
開發者ID:janis91,項目名稱:ocr,代碼行數:10,代碼來源:worker.ts

示例6: addMemberToGroup

  async addMemberToGroup(uid: number, groupid: number): Promise<void> {
    let input: GroupMemberRow = new GroupMemberRow(groupid, uid);

    let result = await this.db.table(USER_TABLES.GROUP_MEMBER.name).insert(input);

    this.logger.info(JSON.stringify(result));
    return;
  }
開發者ID:cuponthetop,項目名稱:bg-hub,代碼行數:8,代碼來源:user.command.ts

示例7: removeMemberFromGroup

  async removeMemberFromGroup(uid: number, groupid: number): Promise<void> {
    let result = await this.db.table(USER_TABLES.GROUP_MEMBER.name).delete().where({
      [USER_TABLES.GROUP_MEMBER.schema.id]: groupid,
      [USER_TABLES.GROUP_MEMBER.schema.member]: uid
    });

    this.logger.info(JSON.stringify(result));
    return;
  }
開發者ID:cuponthetop,項目名稱:bg-hub,代碼行數:9,代碼來源:user.command.ts

示例8: loggerConfig

function loggerConfig(): LoggerInstance {
    'use strict';

    // Log-Level wie bei npm: error, warn, info, verbose, debug, silly
    // https://github.com/winstonjs/winston/blob/master/docs/transports.md
    const logger: LoggerInstance = new (Logger)({
        transports: [
            new (transports.Console)(LOG_OPTIONS.console),
            new (transports.File)(LOG_OPTIONS.file)
        ]
    });

    logger.info('Logging durch Winston ist konfiguriert');
    return logger;
}
開發者ID:AdrianFoell,項目名稱:VP,代碼行數:15,代碼來源:logger.ts

示例9: Date

    res.end = (chunk?: any, encoding?: any) : void => {
      let time: Date = new Date();
      let data = {
        'statusCode': res.statusCode,
        'method': req.method,
        'responseTime': time.getTime() - startTime.getTime(),
        'url': req.originalUrl,
        requestedUrl,
        'ip': req.headers['x-forwarded-for'] || req.ip,
        'userAgent': userAgent,
        'language': req.query.lang || lang
      };

      res.end = requestEnd;
      res.end(chunk, encoding);

      logr.info('', data);
    };
開發者ID:melxx001,項目名稱:simple-nodejs-typescript-starter,代碼行數:18,代碼來源:index.ts


注:本文中的winston.LoggerInstance.info方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。