palantir / witchcraft-go-server

A highly opinionated Go embedded application server for RESTy APIs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

server.Start() should svc1log any errors it encounters

bmoylan opened this issue · comments

server.Start is the de-facto function for application lifecycle. It returns an error that it expects its caller to deal with, but the caller does not have access to the service.1 logger instatiated by Witchcraft. Start should log any errors it encounters before returning (it should still return the error).

In the case that we error before constructing the "real" service logger, we should use the sane defaults that are applied if no configuration is provided.

cc @nmiyake