mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-27 06:03:48 +03:00
resolve logging
This commit is contained in:
parent
38fba5916c
commit
e8d2c50cd9
1 changed files with 1 additions and 7 deletions
|
@ -16,7 +16,6 @@ package caddy
|
|||
|
||||
import (
|
||||
"encoding/json"
|
||||
"flag"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
|
@ -700,12 +699,7 @@ type defaultCustomLog struct {
|
|||
// and enables INFO-level logs and higher.
|
||||
func newDefaultProductionLog() (*defaultCustomLog, error) {
|
||||
cl := new(CustomLog)
|
||||
f := flag.Lookup("test.v")
|
||||
if (f != nil && f.Value.String() != "true") || strings.Contains(os.Args[0], ".test") {
|
||||
cl.writerOpener = &DiscardWriter{}
|
||||
} else {
|
||||
cl.writerOpener = StderrWriter{}
|
||||
}
|
||||
cl.writerOpener = StderrWriter{}
|
||||
|
||||
var err error
|
||||
cl.writer, err = cl.writerOpener.OpenWriter()
|
||||
|
|
Loading…
Reference in a new issue