Hi,

I am a part of an infrastructure team in my company. I have a requirement where I need to support logback configured from code only (infrastructure code). I cannot have users define a logback config file in their respective modules.

The goal is to have an infrastructure module that reads configuration from a property file (not log4j.properties). This file is the placeholder for all the application real configuration. We defined a "language" in which users can instruct the infrastructure on how to configure logback. E.g.:

logger.com.mycompany.1.appender.name=rollingFile
logger.com.mycompany.1.appender.layout=%m%n

My code parses these properties and needs to configure logback accordingly.

My question is  - how do I configure logback in code (assuming the main class is managed by application teams and not infra). I need to wrap a concise logback config file inside the infra module (jar) that holds just enough to give me the code "window" in which I can start the parsing mentioned above.

Any ideas?

Thanks,

Yair