forked from microsoft/vscode-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoutputChannelLogger.ts
More file actions
30 lines (23 loc) · 874 Bytes
/
outputChannelLogger.ts
File metadata and controls
30 lines (23 loc) · 874 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import * as util from 'util';
import { LogOutputChannel } from 'vscode';
import { Arguments, ILogging } from './types';
export class OutputChannelLogger implements ILogging {
constructor(private readonly channel: LogOutputChannel) {}
public traceLog(...data: Arguments): void {
this.channel.appendLine(util.format(...data));
}
public traceError(...data: Arguments): void {
this.channel.error(util.format(...data));
}
public traceWarn(...data: Arguments): void {
this.channel.warn(util.format(...data));
}
public traceInfo(...data: Arguments): void {
this.channel.info(util.format(...data));
}
public traceVerbose(...data: Arguments): void {
this.channel.debug(util.format(...data));
}
}