Ego Use Skills

Console Log Output

1
2
3
4
5
6
7
8
9
10
11
12
13
[logger.default]
level = "info"
maxSize = 200
maxBackup = 2
enableAsync = false
writer = "stderr"

[logger.ego]
level = "info"
maxSize = 200
maxBackup = 2
enableAsync = false
writer = "stderr"

Test Function

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
var tt *gintest.Test

func init() {
eapp.SetEgoDebug("true")
invoker.InitByConf(conf)
tt = gintest.Init(gintest.WithTestMiddleware(DebugToken()))
}


var conf = `
mode = "local"

`

func prettyJsonPrint(jsonStr []byte) {
var prettyJSON bytes.Buffer
error := json.Indent(&prettyJSON, jsonStr, "", "\t")
if error != nil {
log.Println("prettyJsonPrint error: ", error)
log.Println("origin str: " + string(jsonStr))
return
}

fmt.Println(string(prettyJSON.Bytes()))
}