2015-10-10 07:29:18 +00:00
|
|
|
package flog
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2015-10-14 02:16:33 +00:00
|
|
|
var (
|
|
|
|
printContext = map[string]interface{}{
|
|
|
|
"~type":"print",
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2015-10-10 07:29:18 +00:00
|
|
|
func (flogger *internalFlogger) Print(v ...interface{}) {
|
|
|
|
|
|
|
|
msg := fmt.Sprint(v...)
|
|
|
|
|
2015-10-14 02:16:33 +00:00
|
|
|
flogger.route(msg, printContext)
|
2015-10-10 07:29:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (flogger *internalFlogger) Printf(format string, v ...interface{}) {
|
|
|
|
|
|
|
|
msg := fmt.Sprintf(format, v...)
|
|
|
|
|
2015-10-14 02:16:33 +00:00
|
|
|
flogger.route(msg, printContext)
|
2015-10-10 07:29:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (flogger *internalFlogger) Println(v ...interface{}) {
|
|
|
|
|
|
|
|
msg := fmt.Sprintln(v...)
|
|
|
|
|
2015-10-14 02:16:33 +00:00
|
|
|
flogger.route(msg, printContext)
|
2015-10-10 07:29:18 +00:00
|
|
|
}
|