Skip to content

Commit ed712e0

Browse files
committed
nits
1 parent 5617255 commit ed712e0

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

dbos/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type configFile struct {
1515
DatabaseURL string `yaml:"database_url"`
1616
}
1717

18-
func LoadConfig() (*configFile, error) {
18+
func LoadConfigFile() (*configFile, error) {
1919
v := viper.New()
2020
v.SetConfigFile(dbosConfigFileName)
2121
v.AutomaticEnv()
@@ -37,7 +37,7 @@ func LoadConfig() (*configFile, error) {
3737
// 2. configuration file
3838
// 3. environment variables (lowest precedence)
3939
func NewConfig(programmaticConfig config) *config {
40-
fileConfig, err := LoadConfig()
40+
fileConfig, err := LoadConfigFile()
4141
if err != nil && !os.IsNotExist(err) {
4242
panic(err)
4343
}

dbos/dbos.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,7 @@ func getExecutor() *executor {
7878
var logger *slog.Logger
7979

8080
func getLogger() *slog.Logger {
81-
if dbos == nil {
82-
fmt.Println("warning: DBOS instance not initialized, using default logger")
83-
return slog.New(slog.NewTextHandler(os.Stderr, nil))
84-
}
85-
if logger == nil {
86-
fmt.Println("warning: DBOS logger is nil, using default logger")
81+
if dbos == nil || logger == nil {
8782
return slog.New(slog.NewTextHandler(os.Stderr, nil))
8883
}
8984
return logger

0 commit comments

Comments
 (0)