From a29f9a9fb38ff237a52e0a3d810f7b3176e19242 Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Thu, 3 Sep 2020 16:01:56 -0700 Subject: [PATCH] fix(dev-infra): change logging of commit message restoration to debug (#38704) Use debug level of logging for messages in commit message restoration. PR Close #38704 --- .../commit-message/restore-commit-message.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/dev-infra/commit-message/restore-commit-message.ts b/dev-infra/commit-message/restore-commit-message.ts index bcbf302b98..7375ed3b65 100644 --- a/dev-infra/commit-message/restore-commit-message.ts +++ b/dev-infra/commit-message/restore-commit-message.ts @@ -6,9 +6,10 @@ * found in the LICENSE file at https://angular.io/license */ -import {info} from 'console'; import {writeFileSync} from 'fs'; +import {debug, log} from '../utils/console'; + import {loadCommitMessageDraft} from './commit-message-draft'; /** @@ -20,19 +21,19 @@ import {loadCommitMessageDraft} from './commit-message-draft'; export function restoreCommitMessage( filePath: string, source?: 'message'|'template'|'squash'|'commit') { if (!!source) { - info('Skipping commit message restoration attempt'); + log('Skipping commit message restoration attempt'); if (source === 'message') { - info('A commit message was already provided via the command with a -m or -F flag'); + debug('A commit message was already provided via the command with a -m or -F flag'); } if (source === 'template') { - info('A commit message was already provided via the -t flag or config.template setting'); + debug('A commit message was already provided via the -t flag or config.template setting'); } if (source === 'squash') { - info('A commit message was already provided as a merge action or via .git/MERGE_MSG'); + debug('A commit message was already provided as a merge action or via .git/MERGE_MSG'); } if (source === 'commit') { - info('A commit message was already provided through a revision specified via --fixup, -c,'); - info('-C or --amend flag'); + debug('A commit message was already provided through a revision specified via --fixup, -c,'); + debug('-C or --amend flag'); } process.exit(0); }