Fork me on GitHub
Justin Reed22:08:53

I feel like I'm missing a key detail somewhere in the docs and I hope someone can point me in the right direction. Is there a way to specify order in configuration of nodes at the same (top) level of the dependency tree? More detail: I'd like to configure my logger (timbre) first, so all logs of all subsequent configuration steps are routed to the correct appender, etc. Thus, when my DB connection pool is configured, the messages from said configuration show up correctly. Short of declaring the logger to be the top level dependency (even though it doesn't need to be injected), is there an idiomatic way I should do this?

Noah Bogart22:08:51

If they have an order, make them reference each other

Justin Reed22:08:58

Sorry, hit enter too soon. Added more detail.

Noah Bogart22:08:57

I would have to reread the docs but i believe the answer is no. Just make each of the “top level” nodes reference the logger, and it'll happen automatically. Even if you don't need configuration or to inject anything for the logger. You have dependencies, they should be explicit in the dependency map.

Justin Reed22:08:52

Sounds good. Thanks for the help.

👍 1