refactor: framework modules log through diary components
- Each module logs through diary.For(<package>): cabana, lagoon, attach, cooler, postcard, beachcomber, lighthouse, centrifugo, flare, phrasebook, wristband, bouncer - App-published *slog.Logger overrides stay first; messages and attributes unchanged - sunscreen: InstallDefault documented as the compatibility entry point; diary wraps every channel - READMEs list diary as a dependency; logging docs: plugins use diary.For
This commit is contained in:
@@ -56,7 +56,7 @@ func NewMemoryCache(prefix string, maxEntries int) (Cache, error) {
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cooler: memory cache: %w", err)
|
||||
}
|
||||
return &memoryCache{c: c, prefix: prefix, warn: newWarner(slog.Default())}, nil
|
||||
return &memoryCache{c: c, prefix: prefix, warn: newWarner(moduleLog)}, nil
|
||||
}
|
||||
|
||||
func (m *memoryCache) key(k string) string { return m.prefix + "cache:" + k }
|
||||
|
||||
Reference in New Issue
Block a user