mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-15 02:48:30 -05:00
Add static logger class for azdata extension (#11939)
* Add static logger class for arc extension * Fix compile errors * Fix test
This commit is contained in:
24
extensions/azdata/src/common/logger.ts
Normal file
24
extensions/azdata/src/common/logger.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
|
||||
export class Log {
|
||||
private _output: vscode.OutputChannel;
|
||||
|
||||
constructor() {
|
||||
this._output = vscode.window.createOutputChannel('azdata');
|
||||
}
|
||||
|
||||
log(msg: string): void {
|
||||
this._output.appendLine(msg);
|
||||
}
|
||||
|
||||
show(): void {
|
||||
this._output.show(true);
|
||||
}
|
||||
}
|
||||
const Logger = new Log();
|
||||
export default Logger;
|
||||
Reference in New Issue
Block a user