Skip to content

Commit 385a2ba

Browse files
committed
reinstate console.log overrides
1 parent e08ac09 commit 385a2ba

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/server.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import {
2626
} from 'vscode-languageserver/node'
2727
import { TextDocument } from 'vscode-languageserver-textdocument'
2828
import { URI } from 'vscode-uri'
29-
import { showError, SilentError } from './util/error'
29+
import { formatError, showError, SilentError } from './util/error'
3030
import glob from 'fast-glob'
3131
import normalizePath from 'normalize-path'
3232
import * as path from 'path'
@@ -94,12 +94,12 @@ declare var __non_webpack_require__: typeof require
9494
const connection =
9595
process.argv.length <= 2 ? createConnection(process.stdin, process.stdout) : createConnection()
9696

97-
// console.log = connection.console.log.bind(connection.console)
98-
// console.error = connection.console.error.bind(connection.console)
97+
console.log = connection.console.log.bind(connection.console)
98+
console.error = connection.console.error.bind(connection.console)
9999

100-
// process.on('unhandledRejection', (e: any) => {
101-
// connection.console.error(formatError(`Unhandled exception`, e))
102-
// })
100+
process.on('unhandledRejection', (e: any) => {
101+
connection.console.error(formatError(`Unhandled exception`, e))
102+
})
103103

104104
function normalizeFileNameToFsPath(fileName: string) {
105105
return URI.file(fileName).fsPath

0 commit comments

Comments
 (0)