本文整理匯總了TypeScript中@coder/logger.logger.debug方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript logger.debug方法的具體用法?TypeScript logger.debug怎麽用?TypeScript logger.debug使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類@coder/logger.logger
的用法示例。
在下文中一共展示了logger.debug方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: field
req.on("end", () => {
const body = data.join("");
fs.writeFileSync(fullPath, body);
logger.debug("Wrote resource", field("path", fullPath), field("content-length", body.length));
res.status(200);
res.end();
});
示例2: switch
actions.MenuRegistry.appendMenuItem = (id: actions.MenuId, item: actions.IMenuItem | actions.ISubmenuItem): IDisposable => {
if (actions.isIMenuItem(item)) {
switch (item.command.id) {
case ToggleDevToolsAction.ID: // There appears to be no way to toggle this programmatically.
logger.debug(`Skipping unsupported menu item ${item.command.id}`);
return {
dispose: (): void => undefined,
};
}
}
return originalAppend(id, item);
};
示例3: switch
registry.registerWorkbenchAction = (descriptor: SyncActionDescriptor, alias: string, category?: string, when?: ContextKeyExpr): IDisposable => {
switch (descriptor.id) {
case ToggleDevToolsAction.ID: // There appears to be no way to toggle this programmatically.
logger.debug(`Skipping unsupported workbench action ${descriptor.id}`);
return {
dispose: (): void => undefined,
};
case TerminalPasteAction.ID: // Modify the Windows keybinding and add our context key.
// tslint:disable-next-line no-any override private
(descriptor as any)._keybindings = {
primary: KeyMod.CtrlCmd | KeyCode.KEY_V,
linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_V },
win: { primary: KeyMod.CtrlCmd | KeyCode.KEY_V },
mac: { primary: 0 },
};
// tslint:disable-next-line no-any override private
(descriptor as any)._keybindingContext = ContextKeyExpr.and(KEYBINDING_CONTEXT_TERMINAL_FOCUS, workbench.clipboardContextKey);
}
return originalRegister(descriptor, alias, category, when);
};