@@ -18,7 +18,6 @@ import {
18
18
CodeActionKind ,
19
19
} from 'vscode-languageserver-types'
20
20
import { lint , LintResult } from 'sqlint'
21
- import log4js from 'log4js'
22
21
import { RawConfig } from 'sqlint'
23
22
import cache from './cache'
24
23
import { complete } from './complete'
@@ -27,19 +26,15 @@ import createConnection from './createConnection'
27
26
import SettingStore , { Connection as SettingConnection } from './SettingStore'
28
27
import { Schema } from './database_libs/AbstractClient'
29
28
import getDatabaseClient from './database_libs/getDatabaseClient'
30
- import initializeLogging from './initializeLogging'
31
29
import { RequireSqlite3Error } from './database_libs/Sqlite3Client'
30
+ import { stubLogger } from './logger'
32
31
33
32
export type ConnectionMethod = 'node-ipc' | 'stdio'
34
33
35
34
const TRIGGER_CHARATER = '.'
36
35
37
- export function createServerWithConnection (
38
- connection : Connection ,
39
- debug = false
40
- ) {
41
- initializeLogging ( debug )
42
- const logger = log4js . getLogger ( )
36
+ export function createServerWithConnection ( connection : Connection ) {
37
+ const logger = stubLogger ( )
43
38
const documents = new TextDocuments ( TextDocument )
44
39
documents . listen ( connection )
45
40
let schema : Schema = { tables : [ ] , functions : [ ] }
@@ -395,5 +390,5 @@ export function createServer(
395
390
params : { method ?: ConnectionMethod ; debug ?: boolean } = { }
396
391
) {
397
392
const connection : Connection = createConnection ( params . method ?? 'node-ipc' )
398
- return createServerWithConnection ( connection , params . debug )
393
+ return createServerWithConnection ( connection )
399
394
}
0 commit comments