Search in sources :

Example 16 with Cleanup

use of lombok.Cleanup 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);
}
Also used : InputStream(java.io.InputStream) JoranConfigurator(ch.qos.logback.access.joran.JoranConfigurator) Cleanup(lombok.Cleanup) URL(java.net.URL)

Aggregations

Cleanup (lombok.Cleanup)16 Realm (io.realm.Realm)13 SmsDetectionString (com.secupwn.aimsicd.data.model.SmsDetectionString)4 SmsData (com.secupwn.aimsicd.data.model.SmsData)3 IOException (java.io.IOException)3 BitmapDrawable (android.graphics.drawable.BitmapDrawable)2 Drawable (android.graphics.drawable.Drawable)2 CdmaCellLocation (android.telephony.cdma.CdmaCellLocation)2 GsmCellLocation (android.telephony.gsm.GsmCellLocation)2 Import (com.secupwn.aimsicd.data.model.Import)2 CellTowerMarker (com.secupwn.aimsicd.map.CellTowerMarker)2 MarkerData (com.secupwn.aimsicd.map.MarkerData)2 File (java.io.File)2 FileNotFoundException (java.io.FileNotFoundException)2 InputStream (java.io.InputStream)2 Date (java.util.Date)2 LinkedList (java.util.LinkedList)2 GeoPoint (org.osmdroid.util.GeoPoint)2 Intent (android.content.Intent)1 SharedPreferences (android.content.SharedPreferences)1