add debug

This commit is contained in:
Josh at WLTechBlog
2025-08-15 16:29:57 -05:00
parent 4ade9ebafe
commit cf34368901
4 changed files with 49 additions and 645 deletions

View File

@@ -14,13 +14,16 @@ import (
var (
daemonHost = flag.String("listen", "localhost", "Listen address")
port = flag.Int("port", 8989, "Listen port")
debug = flag.Bool("debug", false, "Enable debug logging")
)
func main() {
flag.Parse()
log.Printf("Starting cremote daemon on %s:%d (debug: %v)", *daemonHost, *port, *debug)
// Create and start the daemon
d, err := daemon.NewDaemon(*daemonHost, *port)
d, err := daemon.NewDaemon(*daemonHost, *port, *debug)
if err != nil {
log.Fatalf("Failed to create daemon: %v", err)
}