Skip to content

Commit

Permalink
log something when nflow database is created
Browse files Browse the repository at this point in the history
  • Loading branch information
Edvard Fonsell committed Jun 26, 2015
1 parent 4fc5df8 commit 83ab1a1
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public DatabaseInitializer(String dbType, DataSource ds, Environment env) {
private void populate(ResourceDatabasePopulator populator, DataSource ds) {
try {
execute(populator, ds);
logger.info("Database created.");
} catch (ScriptStatementFailedException ex) {
logger.warn("Failed to create the database, possibly already created: {}", ex.getMessage());
logger.debug("Failed to create the database", ex);
Expand All @@ -37,6 +38,7 @@ private void populate(ResourceDatabasePopulator populator, DataSource ds) {
}

private ResourceDatabasePopulator createPopulator(ClassPathResource script) {
logger.info("Creating database populator using script '{}'", script.getPath().toString());
ResourceDatabasePopulator populator = new ResourceDatabasePopulator();
populator.setIgnoreFailedDrops(true);
populator.setSqlScriptEncoding(UTF_8.name());
Expand Down

0 comments on commit 83ab1a1

Please sign in to comment.