valkyrie icon indicating copy to clipboard operation
valkyrie copied to clipboard

Provide a way to silence and/or format and direct deprecation warnings

Open dmolesUC opened this issue 9 months ago • 2 comments

Currently PCDMUse just uses warn to output its warning about PreservationMasterFile, which means there's no good way to silence it or format its output. If we used Valkyrie::Logging this would send the warnings through the same output and formatting channel used for other logging.

Alternatively (or in addition?) we could use something like @cbeer's deprecation gem (cf. Blacklight), which both makes it possible to configure deprecation warnings separately from other things, and uses a logger (an explicitly configured logger if there is one, or the Rails logger if available, or a fallback logger if not).

dmolesUC avatar Mar 20 '25 16:03 dmolesUC

(I notice there are some other open issues about deprecation, so this seems like something it would be nice to have a pattern for.)

dmolesUC avatar Mar 20 '25 16:03 dmolesUC

@dmolesUC I'd merge a PR that uses the deprecation gem. Great suggestion!

tpendragon avatar Mar 20 '25 19:03 tpendragon