- commit
- 128a382
- parent
- 7f4d312
- author
- Eric Bower
- date
- 2023-09-07 02:09:20 +0000 UTC
chore(router): remove noisy logs
1 files changed,
+0,
-4
1@@ -56,17 +56,14 @@ func CreateServe(routes []Route, subdomainRoutes []Route, cfg *ConfigSite, dbpoo
2 hostDomain := strings.ToLower(strings.Split(r.Host, ":")[0])
3 appDomain := strings.ToLower(strings.Split(cfg.ConfigCms.Domain, ":")[0])
4
5- logger.Infof("servicing request with (hostDomain: %s, appDomain: %s)", hostDomain, appDomain)
6 if hostDomain != appDomain {
7 if strings.Contains(hostDomain, appDomain) {
8 subdomain = strings.TrimSuffix(hostDomain, fmt.Sprintf(".%s", appDomain))
9- logger.Infof("servicing request with (subdomain: %s)", subdomain)
10 if subdomain != "" {
11 curRoutes = subdomainRoutes
12 }
13 } else {
14 subdomain = GetCustomDomain(logger, hostDomain, cfg.Space)
15- logger.Infof("servicing request with (custom domain %s)", subdomain)
16 if subdomain != "" {
17 curRoutes = subdomainRoutes
18 }
19@@ -143,7 +140,6 @@ func GetSubdomain(r *http.Request) string {
20
21 func GetCustomDomain(logger *zap.SugaredLogger, host string, space string) string {
22 txt := fmt.Sprintf("_%s.%s", space, host)
23- logger.Infof("looking up TXT (%s)", txt)
24 records, err := net.LookupTXT(txt)
25 if err != nil {
26 logger.Error(err)