add logging for host

This commit is contained in:
mykola2312 2025-01-28 01:38:11 +02:00
parent 854ae81ddb
commit 6ad3c63866

View file

@ -337,6 +337,8 @@ type HostConfig struct {
ID string `xml:"id"`
Hostname string `xml:"hostname"`
Log LogConfig `xml:"log"`
Heartbeat int `xml:"heartbeat"`
Options []struct {
@ -522,6 +524,9 @@ func hostMain() {
os.Exit(1)
}
// setup logging
setupLogging(config.Log)
// daemonize if needed
if daemonize {
becomeDaemon()