Skip to content

Commit

Permalink
add logs when load mysql_url from other env value
Browse files Browse the repository at this point in the history
  • Loading branch information
V01d42 committed Sep 17, 2024
1 parent a0b9413 commit 80cabb5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/config/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ func LoadMySQLURL() string {
mysqlDatabase, ok_Database := os.LookupEnv(EnvMySQLDatabase)
if ok_Host && ok_Port && ok_User && ok_Password && ok_Database {
mysqlURL := fmt.Sprintf("%s:%s@tcp(%s:%s)/%s", mysqlUser, mysqlPassword, mysqlHost, mysqlPort, mysqlDatabase)
log.Println("load MySQL URL from environment variables MYSQL_USER, MYSQL_PASSWORD, MYSQL_HOST, MYSQL_PORT, MYSQL_DATABASE, not MYSQL_URL")
return mysqlURL
}
mysqlURL := os.Getenv(EnvMySQLURL)
Expand Down

0 comments on commit 80cabb5

Please sign in to comment.