disable extra logging
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-01-05 11:28:34 +11:00
parent 675744ad74
commit cdbf490b68

22
main.go
View File

@@ -57,14 +57,14 @@ func staticFileServer(content embed.FS) gin.HandlerFunc {
// Root request should load index.htm // Root request should load index.htm
if len(fileName) == 1 { 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" fileName = "www/index.html"
} else { } else {
//fileName = strings.TrimLeft(fileName, "/") //fileName = strings.TrimLeft(fileName, "/")
fileName = "www" + 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 // Try to open the file from the embedded FS
file, err := content.Open(fileName) file, err := content.Open(fileName)
@@ -123,15 +123,17 @@ func main() {
log.SetOutput(logfileWriter) log.SetOutput(logfileWriter)
log.Printf("SMT starting execution. Built on %s from sha1 %s\n", buildTime, sha1ver) 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) // for debugging, list all the files that we embedded at compile time
if err != nil { files, err := getAllFilenames(&staticContent)
log.Printf("Unable to access embedded fs : '%s'\n", err) if err != nil {
} log.Printf("Unable to access embedded fs : '%s'\n", err)
}
for i := range files { for i := range files {
log.Printf("Embedded file : '%s'\n", files[i]) log.Printf("Embedded file : '%s'\n", files[i])
} }
*/
// Initiate connection to sqlite and make sure our schema is up to date // Initiate connection to sqlite and make sure our schema is up to date
models.ConnectDatabase() models.ConnectDatabase()