当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript log.ILogService类代码示例

本文整理汇总了TypeScript中vs/platform/log/common/log.ILogService的典型用法代码示例。如果您正苦于以下问题:TypeScript ILogService类的具体用法?TypeScript ILogService怎么用?TypeScript ILogService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ILogService类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: getShellEnvironment

export function getShellEnvironment(logService: ILogService): Promise<typeof process.env> {
	if (_shellEnv === undefined) {
		if (isWindows) {
			logService.trace('getShellEnvironment: runing on windows, skipping');
			_shellEnv = Promise.resolve({});
		} else if (process.env['VSCODE_CLI'] === '1') {
			logService.trace('getShellEnvironment: runing on CLI, skipping');
			_shellEnv = Promise.resolve({});
		} else {
			logService.trace('getShellEnvironment: running on Unix');
			_shellEnv = getUnixShellEnvironment(logService);
		}
	}

	return _shellEnv;
}
开发者ID:fly-fisher,项目名称:vscode,代码行数:16,代码来源:shellEnv.ts

示例2: createStorageService

	private async createStorageService(payload: IWorkspaceInitializationPayload, environmentService: IWorkbenchEnvironmentService, logService: ILogService, mainProcessService: IMainProcessService): Promise<StorageService> {
		const globalStorageDatabase = new GlobalStorageDatabaseChannelClient(mainProcessService.getChannel('storage'));
		const storageService = new StorageService(globalStorageDatabase, logService, environmentService);

		try {
			await storageService.initialize(payload);

			return storageService;
		} catch (error) {
			onUnexpectedError(error);
			logService.error(error);

			return storageService;
		}
	}
开发者ID:PKRoma,项目名称:vscode,代码行数:15,代码来源:main.ts

示例3: createWorkspaceService

	private async createWorkspaceService(payload: IWorkspaceInitializationPayload, environmentService: IWorkbenchEnvironmentService, fileService: FileService, remoteAgentService: IRemoteAgentService, logService: ILogService): Promise<WorkspaceService> {
		const configurationFileService = new ConfigurationFileService();
		configurationFileService.fileService = fileService;

		const workspaceService = new WorkspaceService({ userSettingsResource: environmentService.settingsResource, remoteAuthority: this.configuration.remoteAuthority, configurationCache: new ConfigurationCache(environmentService) }, configurationFileService, remoteAgentService);

		try {
			await workspaceService.initialize(payload);

			return workspaceService;
		} catch (error) {
			onUnexpectedError(error);
			logService.error(error);

			return workspaceService;
		}
	}
开发者ID:PKRoma,项目名称:vscode,代码行数:17,代码来源:main.ts

示例4: Error

	call(_, command: string, arg?: any): Thenable<any> {
		switch (command) {
			case 'setLevel': this.service.setLevel(arg);
		}

		throw new Error(`Call not found: ${command}`);
	}
开发者ID:,项目名称:,代码行数:7,代码来源:

示例5: Error

	call(_: unknown, command: string, arg?: any): Promise<any> {
		switch (command) {
			case 'setLevel': this.service.setLevel(arg); return Promise.resolve();
		}

		throw new Error(`Call not found: ${command}`);
	}
开发者ID:PKRoma,项目名称:vscode,代码行数:7,代码来源:logIpc.ts

示例6: mkdirp

		zipfile.on('entry', (entry: Entry) => {
			logService.debug(targetPath, 'Found', entry.fileName);

			if (isCanceled) {
				return;
			}

			if (!options.sourcePathRegex.test(entry.fileName)) {
				readNextEntry();
				return;
			}

			const fileName = entry.fileName.replace(options.sourcePathRegex, '');

			// directory file names end with '/'
			if (/\/$/.test(fileName)) {
				const targetFileName = path.join(targetPath, fileName);
				last = mkdirp(targetFileName).then(() => readNextEntry());
				return;
			}

			const stream = ninvoke(zipfile, zipfile.openReadStream, entry);
			const mode = modeFromEntry(entry);

			last = throttler.queue(() => stream.then(stream => extractEntry(stream, fileName, mode, targetPath, options).then(() => readNextEntry())));
		});
开发者ID:jumpinjackie,项目名称:sqlopsstudio,代码行数:26,代码来源:zip.ts

示例7: reject

		child.on('close', code => {
			if (code !== 0) {
				return reject(new Error('Failed to get environment'));
			}

			const raw = Buffer.concat(buffers).toString('utf8');
			logService.trace('getUnixShellEnvironment#raw', raw);

			const match = regex.exec(raw);
			const rawStripped = match ? match[1] : '{}';

			try {
				const env = JSON.parse(rawStripped);

				if (runAsNode) {
					env['ELECTRON_RUN_AS_NODE'] = runAsNode;
				} else {
					delete env['ELECTRON_RUN_AS_NODE'];
				}

				if (noAttach) {
					env['ELECTRON_NO_ATTACH_CONSOLE'] = noAttach;
				} else {
					delete env['ELECTRON_NO_ATTACH_CONSOLE'];
				}

				// https://github.com/Microsoft/vscode/issues/22593#issuecomment-336050758
				delete env['XDG_RUNTIME_DIR'];

				logService.trace('getUnixShellEnvironment#result', env);
				resolve(env);
			} catch (err) {
				logService.error('getUnixShellEnvironment#error', err);
				reject(err);
			}
		});
开发者ID:PKRoma,项目名称:vscode,代码行数:36,代码来源:shellEnv.ts

示例8:

		this._register(master.onDidChangeLogLevel(level => logService.setLevel(level)));
开发者ID:PKRoma,项目名称:vscode,代码行数:1,代码来源:logIpc.ts

示例9:

	once(token.onCancellationRequested)(() => {
		logService.debug(targetPath, 'Cancelled.');
		last.cancel();
		zipfile.close();
	});
开发者ID:DonJayamanne,项目名称:vscode,代码行数:5,代码来源:zip.ts

示例10:

		return storageService.initialize(payload).then(() => storageService, error => {
			onUnexpectedError(error);
			logService.error(error);

			return storageService;
		});
开发者ID:joelday,项目名称:vscode,代码行数:6,代码来源:main.ts


注:本文中的vs/platform/log/common/log.ILogService类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。