From e2790f75670e909f78b4a70aca39b9ec97536868 Mon Sep 17 00:00:00 2001 From: Keuin Date: Mon, 12 Sep 2022 12:11:40 +0800 Subject: Bugfix: wrong error logging. --- go.mod | 2 +- recording/runner.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 2afbc9a..176a4fb 100644 --- a/go.mod +++ b/go.mod @@ -6,6 +6,7 @@ require ( github.com/akamensky/argparse v1.4.0 github.com/andybalholm/brotli v1.0.4 github.com/lunixbochs/struc v0.0.0-20200707160740-784aaebc1d40 + github.com/mitchellh/mapstructure v1.5.0 github.com/spf13/viper v1.13.0 golang.org/x/exp v0.0.0-20220907003533-145caa8ea1d0 nhooyr.io/websocket v1.8.7 @@ -16,7 +17,6 @@ require ( github.com/hashicorp/hcl v1.0.0 // indirect github.com/klauspost/compress v1.10.3 // indirect github.com/magiconair/properties v1.8.6 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/pelletier/go-toml v1.9.5 // indirect github.com/pelletier/go-toml/v2 v2.0.5 // indirect github.com/spf13/afero v1.8.2 // indirect diff --git a/recording/runner.go b/recording/runner.go index 3aa7d46..a2f2edc 100644 --- a/recording/runner.go +++ b/recording/runner.go @@ -114,7 +114,7 @@ func tryRunTask(t *RunningTask) error { cancelled = false } } - t.logger.Error("Error when copying live stream: %v", err) + t.logger.Error("Error when copying live stream: %v", err2) if err2 == nil || errors.Is(err2, bilibili.ErrRoomIsClosed) || errors.Is(err2, io.EOF) { t.logger.Info("Live is ended. Stop recording.") return bilibili.ErrRoomIsClosed -- cgit v1.2.3