photoprism/internal/hub/debug.go
Michael Mayer e8e7dfa7b6 Build: Add flag for debug builds
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-04-05 12:09:00 +02:00

17 lines
283 B
Go

//go:build debug
// +build debug
package hub
import (
"os"
"github.com/photoprism/photoprism/pkg/clean"
)
func init() {
if debugUrl := os.Getenv("PHOTOPRISM_HUB_URL"); debugUrl != "" {
log.Infof("config: set hub url to %s", clean.Log(debugUrl))
ServiceURL = debugUrl
}
}