src/vs/workbench/contrib/logs/common/logs.contribution.ts/LogOutputChannels/registerLogChannel
class LogOutputChannels:	private async registerLogChannel(id: string, label: string, file: URI): Promise<void> {
		await whenProviderRegistered(file, this.fileService);
		const outputChannelRegistry = Registry.as<IOutputChannelRegistry>(OutputExt.OutputChannels);
		try {
			const promise = createCancelablePromise(token => this.whenFileExists(file, 1, token));
			this._register(toDisposable(() => promise.cancel()));
			await promise;
			outputChannelRegistry.registerChannel({ id, label, file, log: true });
		} catch (error) {
			if (!isCancellationError(error)) {
				this.logService.error('Error while registering log channel', file.toString(), getErrorMessage(error));
			}
		}
	}