1
0
Fork 0
forked from External/grumble

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.
This commit is contained in:
Derrick 2020-04-11 21:09:35 -07:00
parent df98375463
commit 0d39f28f6e

View file

@ -66,7 +66,7 @@ func (target *logTarget) Write(out []byte) (int, error) {
target.mu.Lock() target.mu.Lock()
defer target.mu.Unlock() defer target.mu.Unlock()
return target.Write(out) return target.w.Write(out)
} }
// Rotate rotates the current log file, if one is opened. // Rotate rotates the current log file, if one is opened.