Skip to content

Commit

Permalink
Add logging to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
dramich committed May 6, 2022
1 parent 3a429cb commit 8eb3732
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,17 @@ Parameter | Description | Default
`affinity` | pod affinity | `{}`
`extraVolumes` | A list of volumes to be added to the pod | `[]`|
`extraVolumeMounts` | A list of volume mounts to be added to the pod | `[]`

## Adjusting Log Output
The log output can be adjusted while deploying through Helm by using the `LOG_LEVEL` and/or `LOG_FORMAT` environment variables.

For example, to set the log level to `trace` the following flag can be added to the helm command:

```
--set 'kubecostModel.extraEnv[0].name=LOG_LEVEL,kubecostModel.extraEnv[0].value=trace'
```
`LOG_FORMAT` options:

`JSON` - A structured logging output: `{"level":"info","time":"2006-01-02T15:04:05.999999999Z07:00","message":"Starting cost-model (git commit \"1.91.0-rc.0\")"}`

`pretty` - A nice human readable output: `2006-01-02T15:04:05.999999999Z07:00 INF Starting cost-model (git commit "1.91.0-rc.0")`

0 comments on commit 8eb3732

Please sign in to comment.