If raven failed to init correctly then you can't close the appender.

Log4j can close the appender when it resets all it's logging configuration from something like a FileWatchdog. Here is the stack trace we got.

Exception in thread "FileWatchdog" java.lang.NullPointerException 
 at net.kencochrane.raven.log4j.SentryAppender.close(SentryAppender.java:230) 
 at org.apache.log4j.helpers.AppenderAttachableImpl.removeAllAppenders(AppenderAttachableImpl.java:141) 
 at org.apache.log4j.Category.removeAllAppenders(Category.java:891) 
 at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:726) 
 at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:615) 
 at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:502) 
 at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:395) 
 at org.apache.log4j.PropertyWatchdog.doOnChange(PropertyConfigurator.java:922) 
 at org.apache.log4j.helpers.FileWatchdog.checkAndConfigure(FileWatchdog.java:89) 
 at org.apache.log4j.helpers.FileWatchdog.run(FileWatchdog.java:108)