Configure logback to defer to Java configuration aka Plain Java Configuration of Logback
问题 I just do not like Logback's XML or Groovy configuration and would prefer to do the configuration in Java (this is also because I'm going to change the configuration at runtime at various times after initialization). It seems the only way to do Java configuration of Logback is to have some sort of initialization that hijacks the root appender or to have custom system properties that tell logback to not use the default configuration (which is rather annoying for unit tests and deployment).