Log executable path, version when starting

This commit is contained in:
Brian Cunnie
2023-01-11 14:04:21 -08:00
parent 94e0bb7abd
commit a6defe5d33
2 changed files with 2 additions and 0 deletions

View File

@@ -29,6 +29,7 @@ var _ = BeforeSuite(func() {
// takes 0.455s to start up on macOS Big Sur 3.7 GHz Quad Core 22-nm Xeon E5-1620v2 processor (2013 Mac Pro) // takes 0.455s to start up on macOS Big Sur 3.7 GHz Quad Core 22-nm Xeon E5-1620v2 processor (2013 Mac Pro)
// takes 1.312s to start up on macOS Big Sur 2.0GHz quad-core 10th-generation Intel Core i5 processor (2020 13" MacBook Pro) // takes 1.312s to start up on macOS Big Sur 2.0GHz quad-core 10th-generation Intel Core i5 processor (2020 13" MacBook Pro)
// 10 seconds should be long enough for slow container-on-a-VM-with-shared-core // 10 seconds should be long enough for slow container-on-a-VM-with-shared-core
Eventually(serverSession.Err, 10).Should(Say(` version \d+\.\d+\.\d+ starting`))
Eventually(serverSession.Err, 10).Should(Say("Ready to answer queries")) Eventually(serverSession.Err, 10).Should(Say("Ready to answer queries"))
}) })

View File

@@ -33,6 +33,7 @@ func main() {
var bindPort = flag.Int("port", 53, "port the DNS server should bind to") var bindPort = flag.Int("port", 53, "port the DNS server should bind to")
var quiet = flag.Bool("quiet", false, "suppresses logging of each DNS response") var quiet = flag.Bool("quiet", false, "suppresses logging of each DNS response")
flag.Parse() flag.Parse()
log.Printf("%s version %s starting", os.Args[0], xip.VersionSemantic)
log.Printf("etcd endpoint: %s, blocklist URL: %s, name servers: %s, bind port: %d, quiet: %t", log.Printf("etcd endpoint: %s, blocklist URL: %s, name servers: %s, bind port: %d, quiet: %t",
*etcdEndpoint, *blocklistURL, *nameservers, *bindPort, *quiet) *etcdEndpoint, *blocklistURL, *nameservers, *bindPort, *quiet)