增加log文件存取,以及增加LOG函数

This commit is contained in:
2020-02-22 00:13:41 +08:00
parent ab294ca6f0
commit bb2311148e
10 changed files with 148 additions and 123 deletions
+1 -2
View File
@@ -4,7 +4,6 @@ import (
"code.hoteas.com/hoteas/hotime"
"code.hoteas.com/hoteas/hotime/tools/db"
"fmt"
"strings"
//"go.hoteas.com/hotime/cache"
"golang.org/x/net/websocket"
"time"
@@ -16,7 +15,7 @@ func main() {
appIns := hotime.Application{}
appIns.SetConnectListener(func(context *hotime.Context) bool {
fmt.Println(context.HandlerStr + time.Now().Format(" 2006-01-02 15:04 ") + hotime.Substr(context.Req.RemoteAddr, 0, strings.Index(context.Req.RemoteAddr, ":")))
//fmt.Println(context.HandlerStr + time.Now().Format(" 2006-01-02 15:04 ") + hotime.Substr(context.Req.RemoteAddr, 0, strings.Index(context.Req.RemoteAddr, ":")))
//this.HandlerStr = "/test.html"
return true