const mixinafIocConfig::ConfigClass



A utility mixin that simply logs injected config on startup. Because sometimes it's nice to see what your app is using! Example:

using afIocConfig

const class AppConfig : ConfigClass {
    @Config const Uri jdbcUrl
    @Config const Str username
    @Config const Str password
    @Config const Str messageOfTheDay

    new make(|This| f) { f(this) } 

Will print:

App Config
Jdbc Url ......... : jdbc:wotever
Username ......... : knobs
Password ......... : secret
Message Of The Day : Eat moar ice-cream!


const static Str dump(Obj configClass, Str? title := null, [Str:Obj]? extra := null)

Dumps the given configClass to a Str, appending any extra properties to the end.

Any key starting with --- is used as a separator.

Is static so it may be called from anywhere, even non-const services.



virtual Void logConfig()

Logs the @Config fields to info.