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:
parent
df98375463
commit
0d39f28f6e
1 changed files with 1 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue