Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update regarding environment variables #1701

Merged
merged 1 commit into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,10 @@ COMPOSE_SP_PLUGSIN_SW=${PLUGSIN_SW:-OFF}
# default: COMPOSE_SP_PLUGSIN_SW
COMPOSE_SP_SERVER_ADDRESS=${SERVER_ADDRESS:-localhost}
# default: COMPOSE_SP_SERVER_ADDRESS=localhost
COMPOSE_SP_TB_API_USERNAME=${SP_TB_API_USERNAME:-}
# default: COMPOSE_SP_TB_API_USERNAME=
# Note - Use SP_TB_API_USERNAME instead of TB_API_USERNAME because TB_API_USERNAME is used in CB-Tumblebug
COMPOSE_SP_API_PASSWORD=${SP_API_PASSWORD:-}
COMPOSE_SP_API_USERNAME=${API_USERNAME:-}
# default: COMPOSE_SP_API_USERNAME=
COMPOSE_SP_API_PASSWORD=${API_PASSWORD:-}
# default: COMPOSE_SP_API_PASSWORD=
# Note - Use SP_API_PASSWORD instead of TB_API_PASSWORD because TB_API_PASSWORD is used in CB-Tumblebug
COMPOSE_SP_LOG_LEVEL=${LOG_LEVEL:-error}
# default: COMPOSE_SP_LOG_LEVEL=error
COMPOSE_SP_HISCALL_LOG_LEVEL=${HISCALL_LOG_LEVEL:-error}
Expand Down
2 changes: 2 additions & 0 deletions src/core/common/logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ var (
func init() {

// Map environment variable names to config file key names
envPrefix := "TB"
viper.SetEnvPrefix(envPrefix)
replacer := strings.NewReplacer(".", "_")
viper.SetEnvKeyReplacer(replacer)

Expand Down