add some logs
This commit is contained in:
parent
8b99344e28
commit
6e3bf0c2be
1 changed files with 3 additions and 0 deletions
3
main.go
3
main.go
|
|
@ -32,11 +32,13 @@ func main() {
|
|||
}
|
||||
|
||||
if os.Getenv("GARBAGE_COLLECT_JOB") == "true" {
|
||||
log.Log.Info("Starting in garbage collect mode")
|
||||
garbagecollect.RunGarbageCollect()
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
if os.Getenv("LOGGER_CLIENT") != "false" && os.Getenv("LOGGER_SERVER") != "true" {
|
||||
log.Log.Info("Starting in client mode")
|
||||
mqttclient.Init()
|
||||
go messageworker.RunClient()
|
||||
for {
|
||||
|
|
@ -44,6 +46,7 @@ func main() {
|
|||
}
|
||||
}
|
||||
if os.Getenv("LOGGER_SERVER") == "true" {
|
||||
log.Log.Info("Starting in server mode")
|
||||
server.Init()
|
||||
go messageworker.RunServer()
|
||||
server.Run()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue