Read the logging level from an environment var
dpordomingo opened this issue · comments
caused by https://github.com/src-d/sourced-ce/issues/142
bblfsh
logging level is only configurable through command arguments, so when directly using the docker image, configuring the logging level is not that simple as changing an env value from the outside.
This seems like a reasonable request, but I would rather not have to re-implement this from first principles. What do other teams do, to support this use case?
@dpordomingo Thanks for the pointers! It looks like the important contribution from go-cli
is bringing in go-log
. @kuba-- has already started some work on migrating us over to use go-log
, so hopefully we will be able to get environment support more easily.
How is the migration going?
Would it be a simple alternative something like this bblfsh/web#227?
In summary, the logging level could be read from the environment and set if no log-level
arg was passed at cmd/bblfshd/main.go#L84
Doing so, it would also unblock https://github.com/src-d/backlog/issues/1485
Would it be a simple alternative something like this bblfsh/web#227?
In summary, the logging level could be read from the environment and set if nolog-level
arg was passed at cmd/bblfshd/main.go#L84Doing so, it would also unblock src-d/backlog#1485
That seems like a reasonable workaround to me. It looks like the work that @kuba-- did makes this a simple enough change to make, too. See #327.