Merge pull request #1194 from SocalNick/nc--send-status-to-migration-context-logger-simple-alternative

Print status to migrationContext logger
This commit is contained in:
dm-2 2022-11-14 15:26:27 +00:00 committed by GitHub
commit fb82caf9e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1036,6 +1036,7 @@ func (this *Migrator) printStatus(rule PrintStatusRule, writers ...io.Writer) {
) )
w := io.MultiWriter(writers...) w := io.MultiWriter(writers...)
fmt.Fprintln(w, status) fmt.Fprintln(w, status)
this.migrationContext.Log.Infof(status)
hooksStatusIntervalSec := this.migrationContext.HooksStatusIntervalSec hooksStatusIntervalSec := this.migrationContext.HooksStatusIntervalSec
if hooksStatusIntervalSec > 0 && elapsedSeconds%hooksStatusIntervalSec == 0 { if hooksStatusIntervalSec > 0 && elapsedSeconds%hooksStatusIntervalSec == 0 {