title: How to replace Spring boot's default logback config from a library?
body: <p>I am building a spring-boot starter to automatically configure logback for our delivery teams. Basically, I ship a set of preconfigured logback appenders which can be enabled and configured through properties.</p>
  
  <p>Goals are:</p>
  
  <ul>
  <li>When starter is added to dependencies, logback is automatically configured. Appenders behaviour can be tweaked (ex. dev VS prod) using regular properties and logger levels set using <code>logging.level</code>. I expect that most users will want and do.</li>
  <li>It is possible to augment default behaviour by providing your own <code>logback(-spring)?.xml</code>. You have to include starter's logback configuration file(s).</li>
  <li>It is possible to completely ignore starter configuration by providing your own logback configuration file.</li>
  </ul>
  
  <p>My issue is that I haven't found a <em>clean</em> way to implement a such library. My current solution is to register an application listener which runs just before  <code>LoggingApplicationListener</code>. If <code>logging.config</code> is not set and no logback configuration file is found, <code>logging.config</code> is set to library's configuration file. Otherwise, it does nothing.</p>
  
  <p>Is there any less hacky way to do that?</p>