fork of https://github.com/sourcegraph/zoekt
0

Configure Feed

Select the types of activity you want to include in your feed.

all: support SRC_LOG_LEVEL debug

It seems SRC_LOG_LEVEL can be specified as "debug" today, and not just
"dbug".

+8 -2
+7 -1
cmd/zoekt-sourcegraph-indexserver/main.go
··· 23 23 "runtime" 24 24 "sort" 25 25 "strconv" 26 + "strings" 26 27 "sync" 27 28 "syscall" 28 29 "time" ··· 655 656 } 656 657 } 657 658 659 + func srcLogLevelIsDebug() bool { 660 + lvl := os.Getenv("SRC_LOG_LEVEL") 661 + return strings.EqualFold(lvl, "dbug") || strings.EqualFold(lvl, "debug") 662 + } 663 + 658 664 func main() { 659 665 defaultIndexDir := os.Getenv("DATA_DIR") 660 666 if defaultIndexDir == "" { ··· 667 673 listen := flag.String("listen", ":6072", "listen on this address.") 668 674 hostname := flag.String("hostname", hostnameBestEffort(), "the name we advertise to Sourcegraph when asking for the list of repositories to index. Can also be set via the NODE_NAME environment variable.") 669 675 cpuFraction := flag.Float64("cpu_fraction", 1.0, "use this fraction of the cores for indexing.") 670 - dbg := flag.Bool("debug", os.Getenv("SRC_LOG_LEVEL") == "dbug", "turn on more verbose logging.") 676 + dbg := flag.Bool("debug", srcLogLevelIsDebug(), "turn on more verbose logging.") 671 677 672 678 // non daemon mode for debugging/testing 673 679 debugList := flag.Bool("debug-list", false, "do not start the indexserver, rather list the repositories owned by this indexserver then quit.")
+1 -1
cmd/zoekt-webserver/main.go
··· 179 179 180 180 // Sourcegraph: Add logging if debug logging enabled 181 181 logLvl := os.Getenv("SRC_LOG_LEVEL") 182 - debug := logLvl == "" || strings.EqualFold(logLvl, "dbug") 182 + debug := logLvl == "" || strings.EqualFold(logLvl, "dbug") || strings.EqualFold(logLvl, "debug") 183 183 if debug { 184 184 searcher = &loggedSearcher{Streamer: searcher} 185 185 }