Skip to content

Commit

Permalink
add trace channel (#374)
Browse files Browse the repository at this point in the history
  • Loading branch information
pgrivachev authored Sep 2, 2022
1 parent 354b26d commit a9ad3a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/src/DbtLanguageClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class DbtLanguageClient implements Disposable {
private statusHandler: StatusHandler,
) {
this.client = new LanguageClient(
'dbtLanguageServer',
'dbtWizard',
'dbt Wizard',
DbtLanguageClient.createServerOptions(port, serverAbsolutePath),
DbtLanguageClient.createClientOptions(port, dbtProjectUri, outputChannelProvider, this.disposables),
Expand Down Expand Up @@ -59,6 +59,7 @@ export class DbtLanguageClient implements Disposable {
diagnosticCollectionName: 'dbtWizard',
synchronize: { fileEvents },
outputChannel: outputChannelProvider.getMainLogChannel(),
traceOutputChannel: outputChannelProvider.getTraceChannel(),
workspaceFolder: { uri: dbtProjectUri, name: dbtProjectUri.path, index: port },
middleware: {
didOpen: async (data: TextDocument, next: (data: TextDocument) => Promise<void>): Promise<void> =>
Expand Down
5 changes: 5 additions & 0 deletions client/src/OutputChannelProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ import { OutputChannel, window } from 'vscode';

export class OutputChannelProvider {
private mainLogChannel = window.createOutputChannel('dbt Wizard');
private traceChannel = window.createOutputChannel('dbt Wizard Trace');
private installLatestDbtChannel?: OutputChannel;
private installDbtAdaptersChannel?: OutputChannel;

getMainLogChannel(): OutputChannel {
return this.mainLogChannel;
}

getTraceChannel(): OutputChannel {
return this.traceChannel;
}

getInstallLatestDbtChannel(): OutputChannel {
if (!this.installLatestDbtChannel) {
this.installLatestDbtChannel = window.createOutputChannel('Install Latest dbt');
Expand Down

0 comments on commit a9ad3a8

Please sign in to comment.