From cd2f2da8fa9bff393bcd90a4ff4fe180c6360b7a Mon Sep 17 00:00:00 2001 From: Ti Chi Robot Date: Fri, 23 Jul 2021 17:12:14 +0800 Subject: [PATCH] Print error log into log file instead of terminal (#1355) (#1356) --- 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)) } } }