Trace should write messages to the logger

This commit is contained in:
Sheetal Nandi 2018-02-21 12:40:36 -08:00
parent 8463b1e028
commit 0b248d5e29

View File

@ -238,7 +238,10 @@ namespace ts.server {
this.setInternalCompilerOptionsForEmittingJsFiles();
const host = this.projectService.host;
if (host.trace) {
if (this.projectService.logger.loggingEnabled()) {
this.trace = s => this.writeLog(s);
}
else if (host.trace) {
this.trace = s => host.trace(s);
}