Skip to content

Commit 7907f53

Browse files
committed
Skip debug logging for command telemetry sending
1 parent 3903b71 commit 7907f53

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/utils/add-telemetry-note-to-reply.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const addTelemetryNoteToReply = async (
2929
interaction: ChatInputCommandInteraction | ContextMenuCommandInteraction,
3030
telemetryResponse: TelemetryResponse | undefined | null,
3131
) => {
32-
const logger = context.logger.nest('addTelemetryNoteToReply');
32+
const logger = context.logger.nest('addTelemetryNoteToReply').muteMethods(['info', 'debug']);
3333
if (telemetryResponse === null) {
3434
logger.debug('Skipped');
3535
return;

src/utils/backend-api-data-updaters.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,14 @@ export const updateShardStats = async (context: LoggerContext, client: Client, s
147147
};
148148

149149
export const sendCommandTelemetry = async (context: LoggerContext & UserSettingsContext, interaction: ChatInputCommandInteraction | ContextMenuCommandInteraction): Promise<TelemetryResponse | undefined | null> => {
150-
const logger = context.logger.nest('sendCommandTelemetry');
150+
const logger = context.logger.nest('sendCommandTelemetry').muteMethods(['info', 'debug']);
151151
logger.debug('Obtaining user consent…');
152152
const settings = await context.getSettings();
153153
if (!settings.telemetry) {
154154
logger.debug('User consent revoked, skip sending telemetry');
155155
return null;
156156
}
157-
logger.log('Sending command telemetry…');
157+
logger.info('Sending command telemetry…');
158158
const body = {
159159
locale: interaction.locale,
160160
commandId: interaction.commandId,

0 commit comments

Comments
 (0)