Skip to content
This repository was archived by the owner on Nov 7, 2025. It is now read-only.

Commit e9e0bb2

Browse files
committed
Nicer logs
1 parent 9559136 commit e9e0bb2

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

platform/ab_testing/sender/coordinator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func (c *SenderCoordinator) receiveHealthStatusesLoop() {
118118
func (c *SenderCoordinator) Start() {
119119

120120
if !c.enabled {
121-
logger.InfoWithCtx(c.ctx).Msg("A/B Testing Controller is disabled")
121+
logger.DebugWithCtx(c.ctx).Msg("A/B Testing Controller is disabled")
122122
return
123123
}
124124

platform/clickhouse/connection.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,19 @@ func InitDBConnectionPool(c *config.QuesmaConfiguration) quesma_api.BackendConne
6262

6363
err := db.Ping()
6464
if err != nil {
65-
logger.Error().Err(err).Msg("Failed to ping database.")
6665
// These error message duplicates messages from end_user_errors.GuessClickhouseErrorType
6766
// Not sure if you want to keep them in sync or not. These two cases are different.
6867

6968
if strings.Contains(err.Error(), "tls: failed to verify certificate") {
70-
logger.Warn().Err(err).Msg("Failed to connect to database with TLS. Retrying TLS, but with disabled chain and host verification.")
69+
logger.Info().Err(err).Msg("Failed to connect to database with TLS. Retrying TLS, but with disabled chain and host verification.")
7170
_ = db.Close()
7271
db = initDBConnection(c, &tls.Config{InsecureSkipVerify: true})
7372
} else if strings.Contains(err.Error(), "tls: first record does not look like a TLS handshake") {
7473
_ = db.Close()
75-
logger.Warn().Err(err).Msg("Failed to connect to database with TLS. Trying without TLS at all.")
74+
logger.Info().Err(err).Msg("Failed to connect to database with TLS. Trying without TLS at all.")
7675
db = initDBConnection(c, nil)
76+
} else {
77+
logger.Info().Err(err).Msg("Failed to ping database and could not apply recovery.")
7778
}
7879
}
7980

platform/ingest/index_name_rewriter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ type indexNameRegexpRewriter struct {
3737
func NewIndexNameRewriter(cfg *config.QuesmaConfiguration) IndexNameRewriter {
3838

3939
if len(cfg.IndexNameRewriteRules) == 0 {
40-
logger.Info().Msgf("No index name rewrite rules configured, using no-op rewriter")
40+
logger.Debug().Msgf("No index name rewrite rules configured, using no-op rewriter")
4141
// if no rewrite rules are configured, return a no-op rewriter
4242
return &NoOpIndexNameRewriter{}
4343
}

platform/ingest/processor.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,6 @@ func (ip *IngestProcessor) processInsertQuery(ctx context.Context,
705705
} else {
706706
// Likely we want to remove below line
707707
createTableCmd = addOurFieldsToCreateTableQuery(createTableCmd, tableConfig, table)
708-
logger.InfoWithCtx(ctx).Msgf("created table '%s' with query: %s", tableName, createTableCmd)
709708
}
710709
}
711710
if table == nil {

0 commit comments

Comments
 (0)