extensions/typescript-language-features/web/webServer.ts/initializeWebSystem
function initializeWebSystem(args: string[]): StartInput {
	createWebSystem(args);
	const modeOrUnknown = parseServerMode();
	let serverMode: ts.LanguageServiceMode | undefined;
	let unknownServerMode: string | undefined;
	if (typeof modeOrUnknown === 'number') { serverMode = modeOrUnknown; }
	else { unknownServerMode = modeOrUnknown; }
	const logger = createLogger();

	// enable deprecation logging
	(ts as any).Debug.loggingHost = {
		log(level: unknown, s: string) {
			switch (level) {
				case (ts as any).LogLevel.Error:
				case (ts as any).LogLevel.Warning:
					return logger.msg(s, ts.server.Msg.Err);
				case (ts as any).LogLevel.Info:
				case (ts as any).LogLevel.Verbose:
					return logger.msg(s, ts.server.Msg.Info);
			}
		}
	};

	return {
		args,
		logger,
		cancellationToken: ts.server.nullCancellationToken,
		// Webserver defaults to partial semantic mode
		serverMode: serverMode ?? ts.LanguageServiceMode.PartialSemantic,
		unknownServerMode,
		startSession: startWebSession
	};
}