Open
Description
Hey folks,
I'm integrating this over at robacarp/mosquito, which is currently taking configuration from an environment variable. In my current situation, it would be nice to be able to emit a message when a default value is rendered. In this case it would be a deprecation notice:
module Mosquito
Habitat.create do
setting redis_url : String do
Log.warn {
<<-error_message
Configuring the Mosquito redis connection via environment variable is deprecated as of 2020-11.
The functionality will be removed in the next _minor_ version bump, 0.9.0.
See: https://github.com/robacarp/mosquito#connecting-to-redis
error_message
}
(ENV["REDIS_URL"]? || "redis://localhost:6379")
end
end
end
Maybe this would be otherwise useful, maybe not.