mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-30 01:37:04 +08:00
增加edge-node accesslog命令,用来在本地查看访问日志
This commit is contained in:
@@ -820,6 +820,18 @@ func (this *Node) listenSock() error {
|
||||
} else {
|
||||
_ = cmd.ReplyOk()
|
||||
}
|
||||
case "accesslog":
|
||||
err := sharedHTTPAccessLogViewer.Start()
|
||||
if err != nil {
|
||||
_ = cmd.Reply(&gosock.Command{
|
||||
Code: "error",
|
||||
Params: map[string]interface{}{
|
||||
"message": "start failed: " + err.Error(),
|
||||
},
|
||||
})
|
||||
} else {
|
||||
_ = cmd.ReplyOk()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user