internal/log: fix setting log level (#74)

- POMERIUM_DEBUG no longer sets log level.
- LOG_LEVEL now responsible for setting global log level.
This commit is contained in:
Bobby DeSimone 2019-03-28 11:40:36 -07:00 committed by GitHub
parent a39e84cef8
commit b18a462681
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 60 additions and 5 deletions

View file

@ -60,7 +60,7 @@ Policy contains the routes, and their access policies. For example,
- Type: `bool`
- Default: `false`
By default, JSON encoded logs are produced. Debug enables colored, human-readable, and more verbose logs to be streamed to [standard out](https://en.wikipedia.org/wiki/Standard_streams#Standard_output_(stdout)). In production, it's recommended to be set to `false`.
By default, JSON encoded logs are produced. Debug enables colored, human-readable logs to be streamed to [standard out](https://en.wikipedia.org/wiki/Standard_streams#Standard_output_(stdout)). In production, it's recommended to be set to `false`.
For example, if `true`
@ -80,6 +80,15 @@ If `false`
{"level":"info","OverrideCertificateName":"","addr":"auth.corp.beyondperimeter.com:443","time":"2019-02-18T10:41:03-08:00","message":"proxy/authenticator: grpc connection"}
```
### Log Level
- Environmental Variable: `LOG_LEVEL`
- Type: `string`
- Options: `debug` `info` `warn` `error`
- Default: `debug`
Log level sets the global logging level for pomerium. Only logs of the desired level and above will be logged.
### Certificate
- Environmental Variable: either `CERTIFICATE` or `CERTIFICATE_FILE`