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


TypeScript RecordingLogger.debug方法代碼示例

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


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

示例1: async

 stop: async () => {
   logger.debug(`Asked to stop, cancelling butler process`);
   cancelled = true;
   if (launchConvo) {
     await launchConvo.cancel();
   }
 },
開發者ID:itchio,項目名稱:itch,代碼行數:7,代碼來源:perform-launch.ts

示例2: performLaunch


//.........這裏部分代碼省略.........
                  buttons: [
                    {
                      label: ["prompt.action.continue"],
                      action: actions.modalResponse({
                        continue: true,
                      }),
                    },
                    "cancel",
                  ],
                })
              );

              if (res) {
                return { continue: true };
              }

              return { continue: false };
            });

            convo.on(messages.PrereqsEnded, async () => {
              closePrereqsModal();
            });

            convo.on(messages.LaunchRunning, async () => {
              logger.info("Now running!");
              ctx.emitProgress({ progress: 1, stage: "run" });

              if (preferences.preventDisplaySleep) {
                powerSaveBlockerId = powerSaveBlocker.start(
                  "prevent-display-sleep"
                );
              }
            });

            convo.on(messages.LaunchExited, async () => {
              logger.info("Exited!");
              ctx.emitProgress({ progress: -1, stage: "clean" });
            });

            convo.on(messages.AllowSandboxSetup, async () => {
              let messageString: LocalizedString = "";
              let detailString: LocalizedString = "";

              if (process.platform === "win32") {
                messageString = ["sandbox.setup.windows.message"];
                detailString = ["sandbox.setup.windows.detail"];
              } else {
                messageString = ["sandbox.setup.linux.message"];
                detailString = ["sandbox.setup.linux.detail"];
              }

              const res = await promisedModal(
                store,
                modals.sandboxBlessing.make({
                  wind: "root",
                  title: ["sandbox.setup.title"],
                  message: messageString,
                  detail: detailString,
                  widgetParams: {},
                  buttons: [
                    {
                      label: ["sandbox.setup.proceed"],
                      action: modals.sandboxBlessing.action({
                        sandboxBlessing: true,
                      }),
                      icon: "security",
                    },
                    "cancel",
                  ],
                })
              );
              if (res && res.sandboxBlessing) {
                return { allow: true };
              }

              return { allow: false };
            });
          }
        );
      } finally {
        closePrereqsModal();
        if (powerSaveBlockerId) {
          powerSaveBlocker.stop(powerSaveBlockerId);
        }
      }
    },
    stop: async () => {
      logger.debug(`Asked to stop, cancelling butler process`);
      cancelled = true;
      if (launchConvo) {
        await launchConvo.cancel();
      }
    },
  });

  if (cancelled) {
    logger.debug(`throwing cancelled`);
    throw new Cancelled();
  }
}
開發者ID:itchio,項目名稱:itch,代碼行數:101,代碼來源:perform-launch.ts


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