hkupty / penna

Opinionated SLF4J backend that logs natively to json
https://hkupty.github.io/penna/
MIT License
47 stars 3 forks source link

Restructure configuration mechanism #89

Closed hkupty closed 5 months ago

hkupty commented 6 months ago

This is a new take on the configuration mechanism. This is PR also changes the required JDK version to 21, effectively bumping Penna out of the 0.7.x branch.

It proposes a few fundamental changes:

Tasks needed on this PR before merging:

Desirable/Maybe in a follow-up PR:

hkupty commented 5 months ago

Not necessarily "atomic binding", but by making a two-step process we can first verify the configuration provider (and perform some meta-configuration, i.e. the file watcher option in yaml) before returning to the manager that it should be initialized, so we only initialize those that are correctly instantiated.

hkupty commented 5 months ago

On the meta-configuration level: It is not the manager's responsibility to figure out which provider should be added. It's the provider's own responsibility. For example, if no yaml configuraiton file exists, the provider will report false back to the manager and should not be initialized.

hkupty commented 5 months ago

Any further cleanups should happen in a subsequent PR as this one scope creeped a bit and is gigantic already.