You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
common: route library logging through a caller-supplied Logger
Add a Logger interface (and matching Config.Logger field) whose method
set lines up with resty.Logger and go-proton-api's WithLogger option,
so callers can plug in a single adapter that captures all bridge log
output along with HTTP-layer warnings emitted by go-proton-api.
Convert the active stdlib log.Println / log.Printf call sites in
cache.go, drive.go, file_download.go, folder_recursive.go, mail.go and
common/user.go to use the configured logger via Config.GetLogger,
which falls back to the stdlib log package when no Logger is set so
existing callers see the same behaviour.
Downgrade the four log.Fatalln sites in cache.go and mail.go: a
library has no business calling os.Exit. The cache assertions become
logged errors (the offending branches were already unreachable in
practice), and the unsupported-recipient case in sendDraft now returns
a new ErrUnsupportedRecipientType.
0 commit comments