use of org.apache.log4j.JulAppender in project presto by prestodb.
the class AccumuloModule method configure.
@Override
public void configure(Binder binder) {
// Add appender to Log4J root logger
// create appender
JulAppender appender = new JulAppender();
appender.setLayout(new PatternLayout("%d %-5p %c - %m%n"));
appender.setThreshold(Level.INFO);
appender.activateOptions();
org.apache.log4j.Logger.getRootLogger().addAppender(appender);
binder.bind(TypeManager.class).toInstance(typeManager);
binder.bind(AccumuloConnector.class).in(Scopes.SINGLETON);
binder.bind(AccumuloConnectorId.class).toInstance(new AccumuloConnectorId(connectorId));
binder.bind(AccumuloMetadata.class).in(Scopes.SINGLETON);
binder.bind(AccumuloMetadataFactory.class).in(Scopes.SINGLETON);
binder.bind(AccumuloClient.class).in(Scopes.SINGLETON);
binder.bind(AccumuloSplitManager.class).in(Scopes.SINGLETON);
binder.bind(AccumuloRecordSetProvider.class).in(Scopes.SINGLETON);
binder.bind(AccumuloPageSinkProvider.class).in(Scopes.SINGLETON);
binder.bind(AccumuloHandleResolver.class).in(Scopes.SINGLETON);
binder.bind(AccumuloSessionProperties.class).in(Scopes.SINGLETON);
binder.bind(AccumuloTableProperties.class).in(Scopes.SINGLETON);
binder.bind(ZooKeeperMetadataManager.class).in(Scopes.SINGLETON);
binder.bind(AccumuloTableManager.class).in(Scopes.SINGLETON);
binder.bind(IndexLookup.class).in(Scopes.SINGLETON);
binder.bind(ColumnCardinalityCache.class).in(Scopes.SINGLETON);
binder.bind(Connector.class).toProvider(ConnectorProvider.class);
configBinder(binder).bindConfig(AccumuloConfig.class);
jsonBinder(binder).addDeserializerBinding(Type.class).to(TypeDeserializer.class);
jsonCodecBinder(binder).bindMapJsonCodec(String.class, JsonCodec.listJsonCodec(AccumuloTable.class));
}
Aggregations