use of ch.qos.logback.access.joran.JoranConfigurator in project logback-access-spring-boot-starter by akihyro.
the class LogbackAccessContext method configureWithCauseThrowing.
/**
* Configures by the configuration file.
* Cause exceptions is not wrapped with {@link LogbackAccessConfigurationException}.
* If configuration file is absent, throws an exception ({@link FileNotFoundException}).
*
* @param config the location of the configuration file.
* @throws IOException if an I/O exception occurs.
* @throws JoranException if a {@link JoranConfigurator} exception occurs.
*/
private void configureWithCauseThrowing(String config) throws IOException, JoranException {
URL url = ResourceUtils.getURL(config);
@Cleanup InputStream stream = url.openStream();
JoranConfigurator configurator = new JoranConfigurator();
configurator.setContext(this);
configurator.doConfigure(stream);
log.info("Configured the Logback-access: context=[{}], config=[{}]", this, config);
}
Aggregations