feat(conga,lagoon): River and GORM log through diary components

- River's logger is diary.For("river") (warn by default), conga's own lines diary.For("conga"); an app-published logger still wins
- GORM logs through logger.NewSlogLogger(diary.For("db")): warn level, record-not-found ignored, parameterized SQL traces only at verbosity 3
- Smoke tests TestRiverLoggerUsesDiarySmoke and TestGormLoggerUsesDiarySmoke
This commit is contained in:
Jakub Zych
2026-10-21 11:51:57 +02:00
parent 5b09b32512
commit e6b20e2cb6
8 changed files with 142 additions and 10 deletions

View File

@@ -514,7 +514,7 @@ func (m *Manager) insertOnlyLocked() (*river.Client[*sql.Tx], error) {
if !ok || sqlDB == nil {
return nil, ErrNoDatabase
}
c, err := newInsertClient(sqlDB, settingsFromApp(m.app), loggerFromApp(m.app))
c, err := newInsertClient(sqlDB, settingsFromApp(m.app), riverLogger(m.app))
if err != nil {
return nil, fmt.Errorf("conga: river client: %w", err)
}