feat(config): add debug server configuration options
- Add debug server listen address and port configuration in config.json and config.go - Update main.go to use debug config values when in debug mode - Add logging for monitor add/remove commands in commandParse.go
This commit is contained in:
7
main.go
7
main.go
@@ -6,7 +6,7 @@ import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
const (
|
||||
var (
|
||||
listenAddr = "127.0.0.1"
|
||||
listenPort = 10080
|
||||
Type = "tcp"
|
||||
@@ -32,10 +32,15 @@ var softwareInfo SoftwareInfo = SoftwareInfo{
|
||||
|
||||
var isDebug bool
|
||||
|
||||
var DebugListenAddr string
|
||||
var DebugListenPort int
|
||||
|
||||
func main() {
|
||||
loadConfig()
|
||||
if isDebug == true {
|
||||
postLog.SetDebugMode(true)
|
||||
listenAddr = DebugListenAddr
|
||||
listenPort = DebugListenPort
|
||||
}
|
||||
postLog.Info(fmt.Sprintf("%s %s (Build %d.%s) by %s", softwareInfo.Name, softwareInfo.Version, softwareInfo.BuildVer, softwareInfo.BuildType, softwareInfo.Developer))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user