lileio / lile

Easily generate gRPC services in Go ⚡️
MIT License
1.51k stars 88 forks source link

Prometheus port is always 9000 in log #44

Closed jinq0123 closed 6 years ago

jinq0123 commented 6 years ago

We should set the port before log.

        logrus.Infof("Prometheus metrics at :9000/metrics")
    port := "9000"
    if p := os.Getenv("PROMETHEUS_PORT"); p != "" {
        port = p
        }
arbarlow commented 6 years ago

Hi @jinq0123, I've just released v2 which allows you set this via a cmd flag!

arbarlow commented 6 years ago

https://github.com/lileio/lile/blob/master/cmd.go#L12