29 lines
693 B
Go
29 lines
693 B
Go
package xlog
|
|
|
|
import (
|
|
"fmt"
|
|
"log"
|
|
)
|
|
|
|
// XLog 日志接口
|
|
type XLog interface{}
|
|
|
|
// These functions write to the standard logger.
|
|
|
|
// Print calls Output to print to the standard logger.
|
|
// Arguments are handled in the manner of fmt.Print.
|
|
func Print(v ...interface{}) {
|
|
log.Output(2, fmt.Sprint(v...))
|
|
}
|
|
|
|
// Printf calls Output to print to the standard logger.
|
|
// Arguments are handled in the manner of fmt.Printf.
|
|
func Printf(format string, v ...interface{}) {
|
|
log.Output(2, fmt.Sprintf(format, v...))
|
|
}
|
|
|
|
// Println calls Output to print to the standard logger.
|
|
// Arguments are handled in the manner of fmt.Println.
|
|
func Println(v ...interface{}) {
|
|
log.Output(2, fmt.Sprintln(v...))
|
|
}
|