mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 09:35:39 -05:00
* add sample for server reports * add license and headers for all samples * add new icons for sp_whoisactive * address comments and use sqlops node module
26 lines
966 B
TypeScript
26 lines
966 B
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
'use strict';
|
|
import * as vscode from 'vscode';
|
|
|
|
import * as Constants from './constants';
|
|
|
|
/**
|
|
* Helper to log messages to the developer console if enabled
|
|
* @param msg Message to log to the console
|
|
*/
|
|
export function logDebug(msg: any): void {
|
|
let config = vscode.workspace.getConfiguration(Constants.extensionConfigSectionName);
|
|
let logDebugInfo = config[Constants.configLogDebugInfo];
|
|
if (logDebugInfo === true) {
|
|
let currentTime = new Date().toLocaleTimeString();
|
|
let outputMsg = '[' + currentTime + ']: ' + msg ? msg.toString() : '';
|
|
console.log(outputMsg);
|
|
}
|
|
}
|
|
|
|
|