From 19f1f2e5098af9b0cc2e7e9b4346b0c6a9fdad0c Mon Sep 17 00:00:00 2001 From: fengou1 <85682690+fengou1@users.noreply.github.com> Date: Fri, 16 Jul 2021 13:57:33 +0800 Subject: [PATCH] Print error log into log file instead of terminal (#1355) --- pkg/restore/systable_restore.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/restore/systable_restore.go b/pkg/restore/systable_restore.go index 43677c407..8f700ca51 100644 --- a/pkg/restore/systable_restore.go +++ b/pkg/restore/systable_restore.go @@ -91,7 +91,7 @@ func (rc *Client) RestoreSystemSchemas(ctx context.Context, f filter.Filter) { tableName := table.Info.Name if f.MatchTable(sysDB, tableName.O) { if err := rc.replaceTemporaryTableToSystable(ctx, tableName.L, db); err != nil { - logutil.WarnTerm("error during merging temporary tables into system tables", + log.Warn("error during merging temporary tables into system tables", logutil.ShortError(err), zap.Stringer("table", tableName), ) @@ -101,7 +101,7 @@ func (rc *Client) RestoreSystemSchemas(ctx context.Context, f filter.Filter) { } if err := rc.afterSystemTablesReplaced(ctx, tablesRestored); err != nil { for _, e := range multierr.Errors(err) { - logutil.WarnTerm("error during reconfigurating the system tables", zap.String("database", sysDB), logutil.ShortError(e)) + log.Warn("error during reconfigurating the system tables", zap.String("database", sysDB), logutil.ShortError(e)) } } }