Skip to content

Commit

Permalink
Make log levels easily configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiimk committed Jul 24, 2024
1 parent 41fac66 commit fb45971
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/kamu-api-server/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: kamu-api-server
description: API server component of the Kamu Compute Node
type: application
version: 0.29.3
version: 0.29.4
appVersion: "0.29.1"
home: https://kamu.dev
icon: https://www.kamu.dev/images/kamu_logo_icon_bg_square.png
Expand Down
2 changes: 2 additions & 0 deletions charts/kamu-api-server/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ spec:
env:
- name: RUST_BACKTRACE
value: "1"
- name: RUST_LOG
value: {{ .Values.app.logLevel | quote }}
{{- if .Values.app.awsCredentials.enabled }}
{{- $secretName := include "kamu-api-server.awsCredentialsSecretName" . }}
- name: AWS_ENDPOINT
Expand Down
4 changes: 4 additions & 0 deletions charts/kamu-api-server/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@
"app": {
"type": "object",
"required": [
"logLevel",
"config"
],
"properties": {
"logLevel": {
"type": "string"
},
"config": {
"type": "object",
"additionalProperties": false,
Expand Down
2 changes: 2 additions & 0 deletions charts/kamu-api-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
###############################################################################

app:
logLevel: "debug,reqwest=info,hyper=info,h2=info"

# TODO: generate schema for config from DTOs
config:
engine:
Expand Down
2 changes: 1 addition & 1 deletion charts/kamu-oracle-provider/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: kamu-oracle-provider
description: Oracle provider that uses Kamu Node to supply data to blockchain smart contracts
type: application
version: 0.29.3
version: 0.29.4
appVersion: "0.29.1"
home: https://kamu.dev
icon: https://www.kamu.dev/images/kamu_logo_icon_bg_square.png
Expand Down
2 changes: 2 additions & 0 deletions charts/kamu-oracle-provider/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ spec:
env:
- name: RUST_BACKTRACE
value: "1"
- name: RUST_LOG
value: {{ .Values.app.logLevel | quote }}
{{- range $key, $value := .Values.extraEnv }}
- name: {{ $key | quote }}
value: {{ $value | quote }}
Expand Down
4 changes: 4 additions & 0 deletions charts/kamu-oracle-provider/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@
"app": {
"type": "object",
"required": [
"logLevel",
"config"
],
"properties": {
"logLevel": {
"type": "string"
},
"config": {
"type": "object",
"required": [],
Expand Down
2 changes: 2 additions & 0 deletions charts/kamu-oracle-provider/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
###############################################################################

app:
logLevel: "debug,kamu=trace,alloy_transport_http=info,alloy_rpc_client=info,reqwest=info,hyper=info,h2=info"

# TODO: generate schema for config from DTOs
config:
http_address: "0.0.0.0"
Expand Down

0 comments on commit fb45971

Please sign in to comment.