log.DaemonMode() debugging

This commit is contained in:
Jeff Carr 2024-11-15 20:06:17 -06:00
parent 90f2a202d5
commit 41ddfe2a32
2 changed files with 10 additions and 0 deletions

View File

@ -162,6 +162,14 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
return 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" { if route == "/listGitDirectories" {
for i, path := range repostatus.ListGitDirectories() { for i, path := range repostatus.ListGitDirectories() {
// log.Info("addRepo()", i, path) // log.Info("addRepo()", i, path)

View File

@ -4,6 +4,7 @@ import (
"embed" "embed"
"go.wit.com/lib/debugger" "go.wit.com/lib/debugger"
"go.wit.com/log"
"go.wit.com/gui" "go.wit.com/gui"
) )
@ -17,6 +18,7 @@ var myargv argv
func main() { func main() {
me = new(autoType) me = new(autoType)
log.DaemonMode(false)
me.myGui = gui.New() me.myGui = gui.New()
if !myargv.GitPull { if !myargv.GitPull {
me.myGui.InitEmbed(resources) me.myGui.InitEmbed(resources)