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