use of org.dbflute.helper.jdbc.connection.DfConnectionMetaInfo in project dbflute-core by dbflute.
the class DfTaskControlLogic method showFinalMessage.
// ===================================================================================
// Final Message
// =============
public void showFinalMessage(long before, long after, boolean abort, String taskName, String finalInformation) {
final String displayTaskName = getDisplayTaskName(taskName);
final String envType = DfEnvironmentType.getInstance().getEnvironmentType();
final StringBuilder sb = new StringBuilder();
final String ln = ln();
sb.append(ln).append("_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/");
sb.append(ln).append("[Final Message]: ").append(getPerformanceView(after - before));
if (abort) {
sb.append(" *Abort");
}
sb.append(ln);
final DfConnectionMetaInfo metaInfo = getConnectionMetaInfo();
final String productDisp = metaInfo != null ? " (" + metaInfo.getProductDisp() + ")" : "";
final String databaseType = getDatabaseTypeFacadeProp().getTargetDatabase() + productDisp;
sb.append(ln).append(" DBFLUTE_CLIENT: {").append(getBasicProperties().getProjectName()).append("}");
sb.append(ln).append(" database = " + databaseType);
sb.append(ln).append(" language = " + getBasicProperties().getTargetLanguage());
sb.append(ln).append(" container = " + getBasicProperties().getTargetContainerName());
sb.append(ln).append(" package = " + getBasicProperties().getPackageBase());
sb.append(ln);
sb.append(ln).append(" DBFLUTE_ENVIRONMENT_TYPE: {").append(envType != null ? envType : "").append("}");
final String driver = _databaseResource.getDriver();
if (driver != null) {
// basically true except cancelled
sb.append(ln).append(" driver = ").append(driver);
sb.append(ln).append(" url = ").append(_databaseResource.getUrl());
sb.append(ln).append(" schema = ").append(_databaseResource.getMainSchema());
sb.append(ln).append(" user = ").append(_databaseResource.getUser());
sb.append(ln).append(" props = ").append(_databaseResource.getConnectionProperties());
}
final String additionalSchemaDisp = buildAdditionalSchemaDisp();
sb.append(ln).append(" additionalSchema = ").append(additionalSchemaDisp);
final DfReplaceSchemaProperties replaceSchemaProp = getProperties().getReplaceSchemaProperties();
sb.append(ln).append(" repsEnvType = ").append(replaceSchemaProp.getRepsEnvType());
final String refreshProjectDisp = buildRefreshProjectDisp();
sb.append(ln).append(" refreshProject = ").append(refreshProjectDisp);
if (finalInformation != null) {
sb.append(ln).append(ln);
sb.append(finalInformation);
}
sb.append(ln).append("_/_/_/_/_/_/_/_/_/_/ {").append(displayTaskName).append("}");
DfDBFluteTaskUtil.logFinalMessage(sb.toString());
}
Aggregations