Add enable logs setting for Flat File Import (#7342)

* Add config for enabling Flat File Import logging

* Move logs to default log location for extensions

* Add localized strings
This commit is contained in:
Charles Gagnon
2019-09-24 18:07:46 -07:00
committed by GitHub
parent 82b19614e1
commit a29ae4d3b9
4 changed files with 18 additions and 7 deletions

View File

@@ -44,7 +44,7 @@ export class ServiceClient {
return new Promise((resolve, reject) => {
serverdownloader.getOrDownloadServer().then(e => {
const installationComplete = Date.now();
let serverOptions = this.generateServerOptions(e);
let serverOptions = this.generateServerOptions(e, context);
client = new SqlOpsDataClient(Constants.serviceName, serverOptions, clientOptions);
const processStart = Date.now();
client.onReady().then(() => {
@@ -90,10 +90,10 @@ export class ServiceClient {
};
}
private generateServerOptions(executablePath: string): ServerOptions {
private generateServerOptions(executablePath: string, context: vscode.ExtensionContext): ServerOptions {
let launchArgs = [];
launchArgs.push('--log-dir');
let logFileLocation = path.join(serviceUtils.getDefaultLogLocation(), 'flatfileimport');
let logFileLocation = context.logPath;
launchArgs.push(logFileLocation);
let config = vscode.workspace.getConfiguration(Constants.extensionConfigSectionName);
if (config) {