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

Print error log into log file instead of terminal #1355

Merged
merged 7 commits into from
Jul 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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