diff --git a/app/src/main/java/com/amaze/filemanager/application/AppConfig.java b/app/src/main/java/com/amaze/filemanager/application/AppConfig.java index fcbe3aaf93..09a33595f9 100644 --- a/app/src/main/java/com/amaze/filemanager/application/AppConfig.java +++ b/app/src/main/java/com/amaze/filemanager/application/AppConfig.java @@ -68,7 +68,7 @@ reportSenderFactoryClasses = AcraReportSenderFactory.class) public class AppConfig extends GlideApplication { - private static final Logger LOG = LoggerFactory.getLogger(AppConfig.class); + private Logger log = null; private UtilitiesProvider utilsProvider; private RequestQueue requestQueue; @@ -107,6 +107,7 @@ public void onCreate() { // disabling file exposure method check for api n+ StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder(); StrictMode.setVmPolicy(builder.build()); + log = LoggerFactory.getLogger(AppConfig.class); } @Override @@ -256,7 +257,9 @@ protected void initACRA() { .build(); ACRA.init(this, acraConfig); } catch (final ACRAConfigurationException ace) { - LOG.warn("failed to initialize ACRA", ace); + if (log != null) { + log.warn("failed to initialize ACRA", ace); + } ErrorActivity.reportError( this, ace,