use io.Writer
This commit is contained in:
parent
72d75ee478
commit
56145cd22a
2
flags.go
2
flags.go
|
@ -27,7 +27,6 @@ package log
|
|||
|
||||
import (
|
||||
"net/http"
|
||||
"os"
|
||||
"sync"
|
||||
)
|
||||
|
||||
|
@ -57,7 +56,6 @@ type LogFlag struct {
|
|||
|
||||
var flags []*LogFlag
|
||||
var daemonMode bool
|
||||
var captureMode *os.File
|
||||
var httpMode http.ResponseWriter
|
||||
|
||||
func init() {
|
||||
|
|
|
@ -5,17 +5,19 @@ package log
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
reallog "log"
|
||||
"net/http"
|
||||
"os"
|
||||
)
|
||||
|
||||
func DaemonMode(b bool) {
|
||||
daemonMode = b
|
||||
}
|
||||
|
||||
func CaptureMode(f *os.File) {
|
||||
captureMode = f
|
||||
var captureMode io.Writer
|
||||
|
||||
func CaptureMode(w io.Writer) {
|
||||
captureMode = w
|
||||
}
|
||||
|
||||
func HttpMode(w http.ResponseWriter) {
|
||||
|
|
Loading…
Reference in New Issue