I am developing extension (JsonEncoder) for the Logback, and it requires
some application services injected.
How can I bootstrap the Logback at application startup to register JsonEncoder
instance with resolved dependencies by DI?
As a result, I want to have programmatically configured logger, and have extension
with references to application services injected.
You can have a custom logger configurator, but it usually instantiate everything manually to setup Logback or any other logging framework. The logging configuration happens before the dependency injection framework kicks in, and it is that way to log all the instantiations and injections.
I would say that if you push too hard you will find a way to do that, but it does not mean it is recommended. What exactly are you trying to inject?