Skip to content

Commit

Permalink
Removed sensitive information from log files
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Grigorev committed Nov 11, 2024
1 parent 304f2e6 commit b62838c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,17 +149,17 @@ func (repo *Repository) addServicesFromConfig(config Config) {
// 2) getting connection properties to define service-specific parameters.
pgconfig, err := pgx.ParseConfig(cs.Conninfo)
if err != nil {
log.Warnf("%s: %s, skip", cs.Conninfo, err)
log.Warnf("%s@%s:%d/%s: %s, skip", pgconfig.User, pgconfig.Host, pgconfig.Port, pgconfig.Database, err)
continue
}

// Check connection using created *ConnConfig, go next if connection failed.
db, err := store.NewWithConfig(pgconfig)
if err != nil {
if config.SkipConnErrorMode {
log.Warnf("%s: %s", cs.Conninfo, err)
log.Warnf("%s@%s:%d/%s: %s", pgconfig.User, pgconfig.Host, pgconfig.Port, pgconfig.Database, err)
} else {
log.Warnf("%s: %s skip", cs.Conninfo, err)
log.Warnf("%s@%s:%d/%s: %s skip", pgconfig.User, pgconfig.Host, pgconfig.Port, pgconfig.Database, err)
continue
}
} else {
Expand Down

0 comments on commit b62838c

Please sign in to comment.