mirror of https://github.com/ginuerzh/gost
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
453 B
30 lines
453 B
package gost
|
|
|
|
import (
|
|
"fmt"
|
|
"log"
|
|
)
|
|
|
|
func init() {
|
|
log.SetFlags(log.LstdFlags | log.Lshortfile)
|
|
}
|
|
|
|
type LogLogger struct {
|
|
}
|
|
|
|
func (l *LogLogger) Log(v ...interface{}) {
|
|
log.Output(3, fmt.Sprintln(v...))
|
|
}
|
|
|
|
func (l *LogLogger) Logf(format string, v ...interface{}) {
|
|
log.Output(3, fmt.Sprintf(format, v...))
|
|
}
|
|
|
|
type NopLogger struct {
|
|
}
|
|
|
|
func (l *NopLogger) Log(v ...interface{}) {
|
|
}
|
|
|
|
func (l *NopLogger) Logf(format string, v ...interface{}) {
|
|
}
|
|
|