mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
we're using json as the log format, and there were various issues in startup where when setting FN_LOG_FORMAT, a few messages would not be in json format. this fixes those cases in this repo, but may not for any packages that extend fn due to initialization order of go (in particular, packages that log anything in init() may or may not come before this is set, we have little control over this except for playing with package names, yes, it's mad) * we were logging a giant ascii fn. i guess this is cool but it doesn't really matter, just moved it into a logrus line so that we don't have to fight over it. call me a peace maker * we were setting the log level/format/destination when initializing the server, but many packages initialize themselves before calling server.New, and those may log (particularly if they fail, which we want...) * particularly hairy were our registration of the various dbs and container drivers, since these logged in init(). I tried to hack around this but did not have any luck. I'm proposing that we just get rid of these lines, there is no easy fix here as setting to debug will result in them not getting logged either, since we can't set debug level until after they've been logged. users that attempt to use any of the drivers or dbs without registering them will still see an error message, so this should be okay overall, we just basically lose the warning that we may have accidentally pulled in one we don't need.