From cdbf490b684d379c8e912441c70f7c79cefc91d6 Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Fri, 5 Jan 2024 11:28:34 +1100 Subject: [PATCH] disable extra logging --- main.go | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/main.go b/main.go index 7f8ddb3..eb041c8 100644 --- a/main.go +++ b/main.go @@ -57,14 +57,14 @@ func staticFileServer(content embed.FS) gin.HandlerFunc { // Root request should load index.htm if len(fileName) == 1 { - log.Printf("staticFileServer replacing root request with index.html") + //log.Printf("staticFileServer replacing root request with index.html") fileName = "www/index.html" } else { //fileName = strings.TrimLeft(fileName, "/") fileName = "www" + fileName } - log.Printf("staticFileServer attempting to load filename '%s'\n", fileName) + //log.Printf("staticFileServer attempting to load filename '%s'\n", fileName) // Try to open the file from the embedded FS file, err := content.Open(fileName) @@ -123,15 +123,17 @@ func main() { log.SetOutput(logfileWriter) log.Printf("SMT starting execution. Built on %s from sha1 %s\n", buildTime, sha1ver) - // for debugging, list all the files that we embedded at compile time - files, err := getAllFilenames(&staticContent) - if err != nil { - log.Printf("Unable to access embedded fs : '%s'\n", err) - } + /* + // for debugging, list all the files that we embedded at compile time + files, err := getAllFilenames(&staticContent) + if err != nil { + log.Printf("Unable to access embedded fs : '%s'\n", err) + } - for i := range files { - log.Printf("Embedded file : '%s'\n", files[i]) - } + for i := range files { + log.Printf("Embedded file : '%s'\n", files[i]) + } + */ // Initiate connection to sqlite and make sure our schema is up to date models.ConnectDatabase()