Log response

This commit is contained in:
Sheetal Nandi
2020-11-13 15:02:48 -08:00
parent 2359c8398e
commit f29b2e7732

View File

@@ -248,6 +248,15 @@ namespace ts.server {
}
public send(msg: protocol.Message) {
if (msg.type === "event" && !this.canUseEvents) {
if (this.logger.hasLevel(LogLevel.verbose)) {
this.logger.info(`Session does not support events: ignored event: ${JSON.stringify(msg)}`);
}
return;
}
if (this.logger.hasLevel(LogLevel.verbose)) {
logger.info(`${msg.type}:${indent(JSON.stringify(msg))}`);
}
postMessage(msg);
}