Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
Print error log into log file instead of terminal (#1355) (#1356)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Jul 23, 2021
1 parent 2566c32 commit cd2f2da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/restore/systable_restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
)
Expand All @@ -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))
}
}
}
Expand Down

0 comments on commit cd2f2da

Please sign in to comment.