loggy loo for node type on startup (#602)

* loggy loo for node type on startup

* additional english verse

* update to most recent suggestion
This commit is contained in:
Reed Allman
2017-12-14 13:43:21 -08:00
committed by GitHub
parent ce2c8c109d
commit 404250a417

View File

@@ -52,6 +52,17 @@ const (
ServerTypeRunner
)
func (s ServerNodeType) String() string {
switch s {
default:
return "full"
case ServerTypeAPI:
return "api"
case ServerTypeRunner:
return "runner"
}
}
type Server struct {
Router *gin.Engine
Agent agent.Agent
@@ -321,7 +332,7 @@ func (s *Server) startGears(ctx context.Context, cancel context.CancelFunc) {
fmt.Println(runHeader)
fmt.Printf(" v%s\n\n", version.Version)
logrus.Infof("Serving Functions API on address `%s`", listen)
logrus.WithField("type", s.nodeType).Infof("Fn serving on `%v`", listen)
server := http.Server{
Addr: listen,