diff --git a/README.md b/README.md index 98c9cae..c21a738 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,9 @@ - [mysql](#mysql) - [Redis](#redis) - [Http](#http) -- Mongodb 开发中... -- Fast-cgi -- GRPC +- [Mongodb](#mongodb) +- Fast-cgi (developing) +- GRPC (developing) - ... ## Demo: @@ -78,12 +78,6 @@ $ go-sniffer [设备名] mysql [参数] ``` ![image](https://github.com/40t/go-sniffer/raw/master/images/mysql.gif) -### http -``` bash -$ go-sniffer [设备名] http [参数] --p 置顶端口,默认80 -``` -![image](https://github.com/40t/go-sniffer/raw/master/images/http.gif) ### redis ``` bash $ go-sniffer [设备名] redis [参数] @@ -91,5 +85,19 @@ $ go-sniffer [设备名] redis [参数] ``` ![image](https://github.com/40t/go-sniffer/raw/master/images/redis.gif) +### http +``` bash +$ go-sniffer [设备名] http [参数] +-p 置顶端口,默认80 +``` +![image](https://github.com/40t/go-sniffer/raw/master/images/http.gif) + +### mongodb +``` bash +$ go-sniffer [设备名] mongodb [参数] +-p 置顶端口,默认27017 +``` +- 支持大部分语句,只有个别少数语句没有实现 + ## License: [MIT](http://opensource.org/licenses/MIT) diff --git a/plugSrc/mongodb/build/util.go b/plugSrc/mongodb/build/util.go index e4ee299..730256d 100644 --- a/plugSrc/mongodb/build/util.go +++ b/plugSrc/mongodb/build/util.go @@ -11,10 +11,12 @@ import ( func GetNowStr(isClient bool) string { var msg string + layout := "01/02 15:04:05.000000" + msg += time.Now().Format(layout) if isClient { - msg = time.Now().Format("2006-01-02 15:04:05")+"| cli -> ser |" + msg += "| cli -> ser |" }else{ - msg = time.Now().Format("2006-01-02 15:04:05")+"| ser -> cli |" + msg += "| ser -> cli |" } return msg }