@ PluginFactory public static RollbarAppender createAppender ( @ PluginAttribute ( "accessToken" ) @ Required final String accessToken , @ PluginAttribute ( "endpoint" ) final String endpoint , @ PluginAttribute ( "environment" ) final String environment , @ PluginAttribute ( "language" ) final String language , @ PluginAttribute ( "configProviderClassName" ) final String configProviderClassName , @ PluginAttribute ( "name" ) @ Required final String name , @ PluginElement ( "Layout" ) Layout < ? extends Serializable > layout , @ PluginElement ( "Filter" ) Filter filter , @ PluginAttribute ( "ignoreExceptions" ) final String ignore ) { ConfigProvider configProvider = ConfigProviderHelper . getConfigProvider ( configProviderClassName ) ; Config config ; ConfigBuilder configBuilder = withAccessToken ( accessToken ) . environment ( environment ) . endpoint ( endpoint ) . server ( new ServerProvider ( ) ) . language ( language ) ; if ( configProvider != null ) { config = configProvider . provide ( configBuilder ) ; } else { config = configBuilder . build ( ) ; } Rollbar rollbar = new Rollbar ( config ) ; boolean ignoreExceptions = Booleans . parseBoolean ( ignore , true ) ; return new RollbarAppender ( name , filter , layout , ignoreExceptions , rollbar ) ; }
Create appender plugin factory method .