mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 10:41:03 +01:00
Merge pull request #1863 from lrita/master
fix the issue of accesslog closing the default writer os.Stdout by SetOutput() method
This commit is contained in:
commit
0381d6f2b6
|
@ -498,6 +498,10 @@ func (ac *AccessLog) setOutput(reset bool, writers ...io.Writer) {
|
||||||
}
|
}
|
||||||
for _, closer := range closers {
|
for _, closer := range closers {
|
||||||
if closer != nil {
|
if closer != nil {
|
||||||
|
// cannot close os.Stdout/os.Stderr
|
||||||
|
if closer == os.Stdout || closer == os.Stderr {
|
||||||
|
continue
|
||||||
|
}
|
||||||
closer.Close()
|
closer.Close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user