Skip to content

Commit 9440447

Browse files
refactor(logs): drop "Amazon Q Logs" channel and just have "Amazon Q"
Problem We didn't have much use for the old "Amazon Q" channel in addition to "Amazon Q Logs". All the logs we used were in "Amazon Q Logs". Solution Now, just have the useful "Amazon Q Logs" channel, but it will be renamed to just "Amazon Q". Signed-off-by: nkomonen-amazon <[email protected]>
1 parent ecaf77f commit 9440447

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

packages/amazonq/src/extension.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,8 @@ export async function activateAmazonQCommon(context: vscode.ExtensionContext, is
9797
globals.manifestPaths.endpoints = context.asAbsolutePath(join('resources', 'endpoints.json'))
9898
globals.regionProvider = RegionProvider.fromEndpointsProvider(makeEndpointsProvider())
9999

100-
const qOutputChannel = vscode.window.createOutputChannel('Amazon Q', { log: true })
101-
const qLogChannel = vscode.window.createOutputChannel('Amazon Q Logs', { log: true })
102-
await activateLogger(context, amazonQContextPrefix, qOutputChannel, qLogChannel)
103-
globals.outputChannel = qOutputChannel
100+
const qLogChannel = vscode.window.createOutputChannel('Amazon Q', { log: true })
101+
await activateLogger(context, amazonQContextPrefix, qLogChannel)
104102
globals.logOutputChannel = qLogChannel
105103
globals.loginManager = new LoginManager(globals.awsContext, new CredentialsStore())
106104

packages/core/src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export async function activateCommon(
8989
// Setup the logger
9090
const toolkitOutputChannel = vscode.window.createOutputChannel('AWS Toolkit', { log: true })
9191
const toolkitLogChannel = vscode.window.createOutputChannel('AWS Toolkit Logs', { log: true })
92-
await activateLogger(context, contextPrefix, toolkitOutputChannel, toolkitLogChannel)
92+
await activateLogger(context, contextPrefix, toolkitLogChannel, toolkitOutputChannel)
9393
globals.outputChannel = toolkitOutputChannel
9494
globals.logOutputChannel = toolkitLogChannel
9595

packages/core/src/shared/logger/activation.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@ import { isBeta } from '../vscode/env'
1717

1818
/**
1919
* Activate Logger functionality for the extension.
20+
*
21+
* @param outputChannel optional output channel for less granular logs
2022
*/
2123
export async function activate(
2224
extensionContext: vscode.ExtensionContext,
2325
contextPrefix: string,
24-
outputChannel: vscode.LogOutputChannel,
25-
logChannel: vscode.LogOutputChannel
26+
logChannel: vscode.LogOutputChannel,
27+
outputChannel?: vscode.LogOutputChannel
2628
): Promise<void> {
2729
const settings = Settings.instance.getSection('aws')
2830
const devLogfile = settings.get('dev.logfile', '')
@@ -52,7 +54,7 @@ export async function activate(
5254
setLogger(
5355
makeLogger({
5456
logLevel: chanLogLevel,
55-
outputChannels: [outputChannel, logChannel],
57+
outputChannels: outputChannel ? [outputChannel, logChannel] : [logChannel],
5658
useConsoleLog: true,
5759
}),
5860
'debugConsole'

0 commit comments

Comments
 (0)