From 41ddfe2a3242852d3386dbbd52e8e54fed7e4ecb Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 15 Nov 2024 20:06:17 -0600 Subject: [PATCH] log.DaemonMode() debugging --- http.go | 8 ++++++++ main.go | 2 ++ 2 files changed, 10 insertions(+) diff --git a/http.go b/http.go index 818089d..d3cb72c 100644 --- a/http.go +++ b/http.go @@ -162,6 +162,14 @@ func okHandler(w http.ResponseWriter, r *http.Request) { return } + // turn off timestamps for STDOUT (systemd adds them) + if route == "/daemon" { + log.Info("daemon mode ???") + log.DaemonMode(false) + log.Info("daemon mode false") + return + } + if route == "/listGitDirectories" { for i, path := range repostatus.ListGitDirectories() { // log.Info("addRepo()", i, path) diff --git a/main.go b/main.go index ce147cc..c4f50be 100644 --- a/main.go +++ b/main.go @@ -4,6 +4,7 @@ import ( "embed" "go.wit.com/lib/debugger" + "go.wit.com/log" "go.wit.com/gui" ) @@ -17,6 +18,7 @@ var myargv argv func main() { me = new(autoType) + log.DaemonMode(false) me.myGui = gui.New() if !myargv.GitPull { me.myGui.InitEmbed(resources)