diff options
author | Derrick <actown@users.noreply.github.com> | 2020-04-12 07:09:35 +0300 |
---|---|---|
committer | Derrick <actown@users.noreply.github.com> | 2020-04-12 07:09:35 +0300 |
commit | 0d39f28f6e34a1f380c8d79563be3b9ce0361d79 (patch) | |
tree | 18fdf2309fd71358efc8cfc70db82ce4042aab54 | |
parent | df983754639dbe9b689f47584bffabae9f438137 (diff) |
Fix infinite loop in log writer.
The log writter would end up calling itself non-stop. This instead tells
the logtarget.Write function to call the MultiWriter's Write instead of
itself.
-rw-r--r-- | pkg/logtarget/logtarget.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/logtarget/logtarget.go b/pkg/logtarget/logtarget.go index 1b69a3b..909d829 100644 --- a/pkg/logtarget/logtarget.go +++ b/pkg/logtarget/logtarget.go @@ -66,7 +66,7 @@ func (target *logTarget) Write(out []byte) (int, error) { target.mu.Lock() defer target.mu.Unlock() - return target.Write(out) + return target.w.Write(out) } // Rotate rotates the current log file, if one is opened. |