<div dir="ltr">Hi,<div><br></div><div>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.</div>
<div><br></div><div>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.:</div>
<div><br></div><div><a href="http://logger.com.mycompany.1.appender.name">logger.com.mycompany.1.appender.name</a>=rollingFile</div><div>logger.com.mycompany.1.appender.layout=%m%n</div><div><br></div><div>My code parses these properties and needs to configure logback accordingly.</div>
<div><br></div><div>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.</div>
<div><br></div><div>Any ideas?</div><div><br></div><div>Thanks,</div><div><br></div><div>Yair</div></div>