mirror of
https://github.com/mumble-voip/grumble.git
synced 2025-12-19 21:59:59 -08:00
Output all LogTarget writes to Stderr as well (for now).
This commit is contained in:
parent
79e5ffbd4d
commit
f47840f8fc
1 changed files with 11 additions and 1 deletions
|
|
@ -29,7 +29,17 @@ func (target *LogTarget) Write(in []byte) (int, error) {
|
|||
target.mu.Lock()
|
||||
defer target.mu.Unlock()
|
||||
|
||||
return target.file.Write(in)
|
||||
n, err := os.Stderr.Write(in)
|
||||
if err != nil {
|
||||
return n, err
|
||||
}
|
||||
|
||||
n, err = target.file.Write(in)
|
||||
if err != nil {
|
||||
return n, err
|
||||
}
|
||||
|
||||
return len(in), nil
|
||||
}
|
||||
|
||||
// OpenFile opens the main log file for writing.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue