[logback-user] Appender class name variable substitution

Pavel Dionisev xseagullx at gmail.com
Tue Jul 7 14:19:19 CEST 2020


Hey All!

I’m trying to configure a custom appender, and I need to make appender class customisable via properties.
In `ch.qos.logback.core.joran.action.AppenderAction` I see, that `className` is not substituted. It’s strange, cause just a few lines below we use `name` attribute to define appenderName, and we substitute it. 

So, questions are: 
1. Why are we doing it this way?
2. What else can I do, to achieve my goal of having appender class externalised?

Can you help, please?

Context, I’m writing a library, that should do most of logging configurations automatically, and I would like users of the library to be able to extend some behaviour that is only available if we let them have custom appenders.

`<appender class=“${myClass}" name=“some name”>`

Using `logback 1.2.3`

Cheers, 
Pavel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20200707/1635c0a7/attachment.html>


More information about the logback-user mailing list