Skip to content

Commit

Permalink
Merge pull request #486 from technige/1.6-driver-logging
Browse files Browse the repository at this point in the history
Better logging for Driver creation
  • Loading branch information
lutovich authored Apr 16, 2018
2 parents 90f9672 + a6ff034 commit dda3e89
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,10 @@ protected InternalDriver createDirectDriver( SecurityPlan securityPlan, BoltServ
{
ConnectionProvider connectionProvider = new DirectConnectionProvider( address, connectionPool );
SessionFactory sessionFactory = createSessionFactory( connectionProvider, retryLogic, config );
return createDriver( securityPlan, sessionFactory, metrics, config );
InternalDriver driver = createDriver(securityPlan, sessionFactory, metrics, config);
Logger log = config.logging().getLog( Driver.class.getSimpleName() );
log.info( "Direct driver instance %s created for server address %s", driver, address.toString() );
return driver;
}

/**
Expand All @@ -176,7 +179,10 @@ protected InternalDriver createRoutingDriver( SecurityPlan securityPlan, BoltSer
ConnectionProvider connectionProvider = createLoadBalancer( address, connectionPool, eventExecutorGroup,
config, routingSettings );
SessionFactory sessionFactory = createSessionFactory( connectionProvider, retryLogic, config );
return createDriver( securityPlan, sessionFactory, metrics, config );
InternalDriver driver = createDriver(securityPlan, sessionFactory, metrics, config);
Logger log = config.logging().getLog( Driver.class.getSimpleName() );
log.info( "Routing driver instance %s created for server address %s", driver, address.toString() );
return driver;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ public class InternalDriver implements Driver
this.sessionFactory = sessionFactory;
this.metrics = metrics;
this.log = logging.getLog( Driver.class.getSimpleName() );
log.info( "Driver instance %s created", this );
}

@Override
Expand Down

0 comments on commit dda3e89

Please sign in to comment.