4cbf048e0e | ||
---|---|---|
.. | ||
modle | ||
modules/websocket | ||
app.go | ||
config.go | ||
configDefault.go | ||
db.go | ||
endpoints.go | ||
logic.go | ||
main.go | ||
messages.go | ||
readme.md | ||
rpc.go |
readme.md
- the rpc logger function can be called by utils.CallRPCLog("addr", logger)
- below is the test function for calling rpc logger
package main
import (
"loreal.com/dit/projects/logger/modle"
"loreal.com/dit/utils"
"fmt"
)
func main() {
log := &modle.Logger{
Project: "test_project",
Method: "GET",
Path: "/user/go",
Level: modle.LevelInfo,
Content: "test content",
}
reply, err := utils.CallRPCLog("localhost:1505", log)
if err != nil {
fmt.Println(err.Error())
return
}
fmt.Println(reply)
}