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:
@@ -2,7 +2,6 @@ package cabana
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"log/slog"
|
||||
"net/http"
|
||||
|
||||
"git.golem15.com/golem15/summercms/modules/pact"
|
||||
@@ -101,7 +100,7 @@ func (s *service) singletonRoute(w http.ResponseWriter, r *http.Request) {
|
||||
if err != nil {
|
||||
var missing recordNotFound
|
||||
if !errors.As(err, &missing) {
|
||||
slog.Error("cabana: singleton record failed", "controller", controllerID(cc), "error", err)
|
||||
moduleLog.Error("cabana: singleton record failed", "controller", controllerID(cc), "error", err)
|
||||
}
|
||||
// A refusal from SingletonRecord carries plugin phrase keys.
|
||||
writeCRUDError(w, localizeControllerError(ctx, s.translator(), err))
|
||||
|
||||
Reference in New Issue
Block a user