Commit dac0d0e0 authored by Your Name's avatar Your Name

default log is debug

parent 6f07b90c
...@@ -460,7 +460,7 @@ func main() { ...@@ -460,7 +460,7 @@ func main() {
flag.BoolVar(&withBillDb, "withbilldb", true, "enable with bill db, or simulate") flag.BoolVar(&withBillDb, "withbilldb", true, "enable with bill db, or simulate")
flag.IntVar(&logLevel, "loglevel", 0, "log level,default is debug,LevelDebug Level = -4 LevelInfo Level = 0 LevelWarn Level = 4 LevelError Level = 8 ") flag.IntVar(&logLevel, "loglevel", -4, "log level,default is debug,LevelDebug Level = -4 LevelInfo Level = 0 LevelWarn Level = 4 LevelError Level = 8 ")
flag.Parse() flag.Parse()
...@@ -628,7 +628,7 @@ func ApiAndJWT(c *fiber.Ctx) error { ...@@ -628,7 +628,7 @@ func ApiAndJWT(c *fiber.Ctx) error {
pbMsg := pbUpstream.TaskContent{ pbMsg := pbUpstream.TaskContent{
TaskId: reqHeaders["Task-Id"][0], TaskId: reqHeaders["Task-Id"][0],
TaskType: uint64(task.ID), TaskType: uint64(task.ID),
TaskKind: 1, TaskKind: pbUpstream.TaskKind(task.Kind),
TaskCmd: task.Cmd, TaskCmd: task.Cmd,
TaskParam: c.Body(), //[]byte(reqHeaders["Task-Id"][0]), TaskParam: c.Body(), //[]byte(reqHeaders["Task-Id"][0]),
TaskTimestamp: uint64(time.Now().UnixNano()), TaskTimestamp: uint64(time.Now().UnixNano()),
...@@ -688,10 +688,9 @@ func ApiAndJWT(c *fiber.Ctx) error { ...@@ -688,10 +688,9 @@ func ApiAndJWT(c *fiber.Ctx) error {
//fmt.Println("asyncMode-----------", asyncMode) //fmt.Println("asyncMode-----------", asyncMode)
if asyncMode { if asyncMode {
//time.Sleep(10 * time.Second) time.Sleep(10 * time.Second)
m := make([]byte, 1024*1024+1024*512)
m := make([]byte, 1024*1024) return c.Send(m)
return c.SendString(string(m))
//return c.SendString(pbMsg.TaskId) //return c.SendString(pbMsg.TaskId)
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment