[Minor] less logging
This commit is contained in:
parent
b8c07015d1
commit
30d4916a7e
|
@ -97,7 +97,8 @@ public class Migrations {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (migrationsRan.isEmpty()) {
|
if (migrationsRan.isEmpty()) {
|
||||||
logger.info("There were no migrations required!");
|
if (this.verbose)
|
||||||
|
logger.info("There were no migrations required!");
|
||||||
} else {
|
} else {
|
||||||
logger.info("Migrated " + migrationsRan.size() + " realms!");
|
logger.info("Migrated " + migrationsRan.size() + " realms!");
|
||||||
}
|
}
|
||||||
|
@ -144,7 +145,8 @@ public class Migrations {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (migrationsRan.isEmpty()) {
|
if (migrationsRan.isEmpty()) {
|
||||||
logger.info("There were no migrations required!");
|
if (this.verbose)
|
||||||
|
logger.info("There were no migrations required!");
|
||||||
} else {
|
} else {
|
||||||
logger.info("Migrated " + migrationsRan.size() + " realms!");
|
logger.info("Migrated " + migrationsRan.size() + " realms!");
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,6 +92,10 @@ public class MigrationsHandler extends StrolchComponent {
|
||||||
migrations.runCodeMigrations(cert, codeMigrationsByRealm);
|
migrations.runCodeMigrations(cert, codeMigrationsByRealm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isVerbose() {
|
||||||
|
return this.verbose;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initialize(ComponentConfiguration configuration) {
|
public void initialize(ComponentConfiguration configuration) {
|
||||||
|
|
||||||
|
@ -163,7 +167,8 @@ public class MigrationsHandler extends StrolchComponent {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
||||||
if (!MigrationsHandler.this.migrationsPath.isDirectory()) {
|
if (!MigrationsHandler.this.migrationsPath.isDirectory()) {
|
||||||
logger.info("There are no migrations required at the moment!");
|
if (verbose)
|
||||||
|
logger.info("There are no migrations required at the moment!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,7 +184,8 @@ public class MigrationsHandler extends StrolchComponent {
|
||||||
MigrationsHandler.this.migrations = migrations;
|
MigrationsHandler.this.migrations = migrations;
|
||||||
|
|
||||||
if (migrations.getMigrationsToRun().isEmpty()) {
|
if (migrations.getMigrationsToRun().isEmpty()) {
|
||||||
logger.info("There are no migrations required at the moment!");
|
if (verbose)
|
||||||
|
logger.info("There are no migrations required at the moment!");
|
||||||
} else {
|
} else {
|
||||||
RunMigrationsAction runMigrationsAction = new RunMigrationsAction(MigrationsHandler.this.migrations);
|
RunMigrationsAction runMigrationsAction = new RunMigrationsAction(MigrationsHandler.this.migrations);
|
||||||
privilegeHandler.runAsSystem(RealmHandler.SYSTEM_USER_AGENT, runMigrationsAction);
|
privilegeHandler.runAsSystem(RealmHandler.SYSTEM_USER_AGENT, runMigrationsAction);
|
||||||
|
|
Loading…
Reference in New Issue