puppetlabs/trapperkeeper

Allow custom ConfigService

Opened this issue · 0 comments

Use Case

There are some libraries that makes configuration much easier, e.g. aero. But specifically aero configuration might contain tagged literals unrecognized by clojure.edn/read. And because the same configuration files is used for both (logging and application configuration) it is not enough to simply introduce custom implementation of ConfigService in the bootstrap.cfg file.

Describe the Solution You Would Like

  1. Separate logging configuration from the main config (e.g. encapsulate it in the new tk-config.edn to highlight that this config is for the framework itself)
  2. Do not inject ConfigService when such service already present in services list.

Describe Alternatives You've Considered

Create separate LogginService with a single dependency: ConfigService. For correct logging initialization this might require altering services startup order to always load ConfigService and then LoggingService before other application services.