mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 10:08:49 +01:00
Enable logging for TS Server on web
The web server does not have a log file
This commit is contained in:
@@ -10,6 +10,7 @@ import { ClientCapabilities, ClientCapability, ServerType } from '../typescriptS
|
||||
import API from '../utils/api';
|
||||
import { SeparateSyntaxServerConfiguration, TsServerLogLevel, TypeScriptServiceConfiguration } from '../utils/configuration';
|
||||
import { Logger } from '../utils/logger';
|
||||
import { isWeb } from '../utils/platform';
|
||||
import { TypeScriptPluginPathsProvider } from '../utils/pluginPathsProvider';
|
||||
import { PluginManager } from '../utils/plugins';
|
||||
import { TelemetryReporter } from '../utils/telemetry';
|
||||
@@ -203,11 +204,15 @@ export class TypeScriptServerSpawner {
|
||||
}
|
||||
|
||||
if (TypeScriptServerSpawner.isLoggingEnabled(configuration)) {
|
||||
const logDir = this._logDirectoryProvider.getNewLogDirectory();
|
||||
if (logDir) {
|
||||
tsServerLogFile = path.join(logDir, `tsserver.log`);
|
||||
if (isWeb()) {
|
||||
args.push('--logVerbosity', TsServerLogLevel.toString(configuration.tsServerLogLevel));
|
||||
args.push('--logFile', tsServerLogFile);
|
||||
} else {
|
||||
const logDir = this._logDirectoryProvider.getNewLogDirectory();
|
||||
if (logDir) {
|
||||
tsServerLogFile = path.join(logDir, `tsserver.log`);
|
||||
args.push('--logVerbosity', TsServerLogLevel.toString(configuration.tsServerLogLevel));
|
||||
args.push('--logFile', tsServerLogFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user