Skip to content

Commit

Permalink
Add telemetry tracking for logfilePath
Browse files Browse the repository at this point in the history
  • Loading branch information
TwitchBronBron committed Jun 1, 2023
1 parent 5e6472d commit 64bab89
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,7 @@
},
"logfilePath": {
"type": "string",
"deprecationMessage": "Use `fileLogging` option instead",
"description": "A path to a file where all brightscript console output will be written. If null or empty, file logging will be disabled."
},
"enableDebugProtocol": {
Expand Down Expand Up @@ -1772,6 +1773,7 @@
},
"brightscript.debug.logfilePath": {
"type": "string",
"deprecationMessage": "Use `fileLogging` option instead",
"description": "A path to a file where all brightscript console output will be written. If null or empty, file logging will be disabled.",
"scope": "resource"
},
Expand Down Expand Up @@ -2140,6 +2142,7 @@
"properties": {
"brightscript.extensionLogfilePath": {
"type": "string",
"deprecationMessage": "Use `fileLogging` option instead",
"description": "File where the 'BrightScript Extension' output panel (i.e. debug logs for the extension) will be appended. If omitted, no file logging will be done. ${workspaceFolder} is supported and will point to the first workspace found.",
"scope": "resource"
}
Expand Down Expand Up @@ -3544,4 +3547,4 @@
"Debuggers",
"Snippets"
]
}
}
7 changes: 6 additions & 1 deletion src/managers/TelemetryManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import TelemetryReporter from '@vscode/extension-telemetry';
import type { Disposable } from 'vscode';
import type { BrightScriptLaunchConfiguration } from '../DebugConfigurationProvider';
import type { RemoteControlModeInitiator } from './RemoteControlManager';
import * as vscode from 'vscode';

const APP_INSIGHTS_KEY = '8618f206-4732-4729-88ed-d07dcf17f199';

Expand Down Expand Up @@ -40,7 +41,11 @@ export class TelemetryManager implements Disposable {
isPreLaunchTaskDefined: isDefined(event.preLaunchTask),
isComponentLibrariesDefined: isDefined(event.componentLibraries),
isDeepLinkUrlDefined: isDefined(event.deepLinkUrl),
isStagingFolderPathDefined: isDefined(event.stagingFolderPath)
isStagingFolderPathDefined: isDefined(event.stagingFolderPath),
isLogfilePathDefined: isDefined(event.logfilePath),
isExtensionLogfilePathDefined: isDefined(
vscode.workspace.getConfiguration('brightscript').get<string>('extensionLogfilePath')
)
});
}

Expand Down

0 comments on commit 64bab89

Please sign in to comment.