func New(inst string) { instance = inst exp.Exp(metrics.DefaultRegistry) expvar.NewString("instance").Set(instance) expvar.NewString("service").Set(service) }
func init() { var format = "%{color}%{time:15:04:05.000000} ▶ %{level:.4s} %{color:reset} %{message}" logBackend := logging.NewLogBackend(os.Stderr, "", 0) logging.SetFormatter(logging.MustStringFormatter(format)) logging.SetBackend(logBackend) exp.Exp(metrics.DefaultRegistry) }