Skip to content

Commit 0b248d5

Browse files
committed
Trace should write messages to the logger
1 parent 8463b1e commit 0b248d5

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/server/project.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,10 @@ namespace ts.server {
238238

239239
this.setInternalCompilerOptionsForEmittingJsFiles();
240240
const host = this.projectService.host;
241-
if (host.trace) {
241+
if (this.projectService.logger.loggingEnabled()) {
242+
this.trace = s => this.writeLog(s);
243+
}
244+
else if (host.trace) {
242245
this.trace = s => host.trace(s);
243246
}
244247

0 commit comments

Comments
 (0)