changed log levels

This commit is contained in:
TonyO 2017-12-22 23:05:05 -06:00
parent 6f793bb9fa
commit 9afd19be0a
13 changed files with 33 additions and 33 deletions

View File

@ -76,7 +76,7 @@ public class DBQueryResultImportReader implements TableDataReader {
this.dbColumns = columns;
this.databaseService = databaseService;
this.dbQueryInfo = dbQueryInfo;
logger.info("DBQueryResultImportReader::batchSize:" + batchSize);
logger.info("batchSize:" + batchSize);
}
@ -118,12 +118,12 @@ public class DBQueryResultImportReader implements TableDataReader {
setProgress(job, querySource, progress++);
}
if(processedRows % 10000 == 0) {
logger.info("[[ {} rows processed... ]]",processedRows);
logger.debug("[[ {} rows processed... ]]",processedRows);
}
}
return result;
} else {
logger.info("[[processedRows:{} ]]", processedRows);
logger.debug("[[processedRows:{} ]]", processedRows);
return null;
}

View File

@ -74,7 +74,7 @@ public class DBQueryResultPreviewReader implements TableDataReader {
this.dbColumns = columns;
this.databaseService = databaseService;
this.dbQueryInfo = dbQueryInfo;
logger.info("DBQueryResultPreviewReader::batchSize:" + batchSize);
logger.debug("DBQueryResultPreviewReader::batchSize:" + batchSize);
}
@ -91,7 +91,7 @@ public class DBQueryResultPreviewReader implements TableDataReader {
row.add(cd.getName());
}
usedHeaders = true;
logger.info("Exit::getNextRowOfCells return header::row:" + row);
// logger.debug("Exit::getNextRowOfCells return header::row:" + row);
return row;
}
@ -107,7 +107,7 @@ public class DBQueryResultPreviewReader implements TableDataReader {
//logger.info("Exit::getNextRowOfCells :rowsOfCellsNotNull::rowsOfCells size:" + rowsOfCells.size() + ":batchRowStart:" + batchRowStart + " ::nextRow:" + nextRow);
return rowsOfCells.get(nextRow++ - batchRowStart);
} else {
logger.info("nextRow:{}, batchRowStart:{}", nextRow, batchRowStart);
logger.debug("nextRow:{}, batchRowStart:{}", nextRow, batchRowStart);
//
// rowsOfCells = getRowsOfCells(batchRowStart);
// if(rowsOfCells != null) {
@ -139,7 +139,7 @@ public class DBQueryResultPreviewReader implements TableDataReader {
List<List<Object>> rowsOfCells = new ArrayList<List<Object>>(batchSize);
String query = databaseService.buildLimitQuery(batchSize, startRow, dbQueryInfo.getQuery());
logger.info("batchSize::" + batchSize + " startRow::" + startRow + " query::" + query );
logger.debug("batchSize::" + batchSize + " startRow::" + startRow + " query::" + query );
List<DatabaseRow> dbRows = databaseService.getRows(dbQueryInfo.getDbConfig(), query);

View File

@ -89,7 +89,7 @@ public class DatabaseImportController implements ImportingController {
String subCommand = parameters.getProperty("subCommand");
logger.info("DatabaseImportController::doPost::subCommand::{}", subCommand);
logger.debug("DatabaseImportController::doPost::subCommand::{}", subCommand);
if ("initialize-parser-ui".equals(subCommand)) {
doInitializeParserUI(request, response, parameters);
@ -129,7 +129,7 @@ public class DatabaseImportController implements ImportingController {
JSONUtilities.safePut(options, "storeBlankRows", true);
JSONUtilities.safePut(options, "storeBlankCellsAsNulls", true);
logger.info("doInitializeParserUI:::{}", result.toString());
logger.debug("doInitializeParserUI:::{}", result.toString());
HttpUtilities.respond(response, result.toString());
}
@ -381,7 +381,7 @@ public class DatabaseImportController implements ImportingController {
long endTime = System.currentTimeMillis() ;
logger.info("Execution Time: {}", endTime - startTime);
logger.debug("Execution Time: {}", endTime - startTime);
setProgress(job, querySource, 100);
@ -421,7 +421,7 @@ public class DatabaseImportController implements ImportingController {
|| jdbcConfig.getDatabasePassword() == null || jdbcConfig.getDatabaseType() == null
|| jdbcConfig.getDatabaseUser() == null || query == null) {
logger.info("Missing Database Configuration::{}", jdbcConfig);
logger.debug("Missing Database Configuration::{}", jdbcConfig);
return null;
}

View File

@ -60,13 +60,13 @@ public class DatabaseModuleImpl extends ButterflyModuleImpl implements Jsonizabl
// TODO Auto-generated method stub
super.init(config);
logger.info("init called in DatabaseModuleImpl: {}", config);
readModuleProperty();
// Set the singleton.
instance = this;
logger.info("*** Database Extension Module init complete ***");
}
public static String getImportCreateBatchSize() {

View File

@ -93,7 +93,7 @@ public abstract class DatabaseService {
* @return
*/
public static DatabaseService get(String dbType) {
logger.info("get called on DatabaseService with, {}", dbType);
logger.debug("get called on DatabaseService with, {}", dbType);
DatabaseService databaseService = DatabaseService.DBType.getJdbcServiceFromType(dbType.toLowerCase());
logger.debug("DatabaseService found: {}", databaseService.getClass());

View File

@ -66,7 +66,7 @@ public class DatabaseUtils {
File file = new File(filename);
if (!file.exists()) {
logger.info("saved connections file not found, creating new: {}", filename);
//logger.debug("saved connections file not found, creating new: {}", filename);
String dirPath = getExtensionFolder();
File dirFile = new File(dirPath);
@ -85,7 +85,7 @@ public class DatabaseUtils {
}
}
logger.info("saved connections file found {}", filename);
//logger.debug("saved connections file found {}", filename);
SavedConnectionContainer savedConnectionContainer = mapper.readValue(new File(filename), SavedConnectionContainer.class);
//return decryptAll(savedConnectionContainer.getSavedConnections());
return savedConnectionContainer.getSavedConnections();
@ -110,13 +110,13 @@ public class DatabaseUtils {
* @return
*/
public static DatabaseConfiguration getSavedConnection(String connectionName) {
logger.info("get saved connection called with connectionName: {}", connectionName);
//logger.debug("get saved connection called with connectionName: {}", connectionName);
List<DatabaseConfiguration> savedConfigurations = getSavedConnections();
for (DatabaseConfiguration dc : savedConfigurations) {
logger.info("Saved Connection : {}", dc.getConnectionName());
//logger.debug("Saved Connection : {}", dc.getConnectionName());
if (dc.getConnectionName().equalsIgnoreCase(connectionName.trim())) {
logger.info("Saved Connection Found : {}", dc);
//logger.debug("Saved Connection Found : {}", dc);
//dc.setDatabasePassword(decrypt(dc.getDatabasePassword()));
return dc;
}
@ -186,7 +186,7 @@ public class DatabaseUtils {
try {
List<DatabaseConfiguration> savedConnections = getSavedConnections();
logger.info("Size before delete SavedConnections :: {}", savedConnections.size());
logger.debug("Size before delete SavedConnections :: {}", savedConnections.size());
ArrayList<DatabaseConfiguration> newSavedConns = new ArrayList<DatabaseConfiguration>();
for(DatabaseConfiguration dc: savedConnections) {
@ -201,7 +201,7 @@ public class DatabaseUtils {
SavedConnectionContainer savedConnectionContainer = mapper.readValue(new File(savedConnectionFile), SavedConnectionContainer.class);
savedConnectionContainer.setSavedConnections(newSavedConns);
logger.info("Size after delete SavedConnections :: {}", savedConnectionContainer.getSavedConnections().size());
logger.debug("Size after delete SavedConnections :: {}", savedConnectionContainer.getSavedConnections().size());
mapper.writerWithDefaultPrettyPrinter().writeValue(new File(savedConnectionFile), savedConnectionContainer);
} catch (JsonGenerationException e1) {
@ -221,7 +221,7 @@ public class DatabaseUtils {
* @param jdbcConfig
*/
public static void editSavedConnections(DatabaseConfiguration jdbcConfig) {
logger.info("Edit SavedConnections called with: {}", jdbcConfig);
logger.debug("Edit SavedConnections called with: {}", jdbcConfig);
try {

View File

@ -56,7 +56,7 @@ public class ConnectCommand extends DatabaseCommand {
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
logger.info("ConnectCommand::Post");
logger.debug("ConnectCommand::Post");
DatabaseConfiguration databaseConfiguration = getJdbcConfiguration(request);
logger.info("ConnectCommand::Post::{}", databaseConfiguration);

View File

@ -55,7 +55,7 @@ public class ExecuteQueryCommand extends DatabaseCommand {
@Override
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
logger.info("QueryCommand::Post");
logger.debug("QueryCommand::Post");
DatabaseConfiguration databaseConfiguration = getJdbcConfiguration(request);
String query = request.getParameter("queryString");
@ -76,7 +76,7 @@ public class ExecuteQueryCommand extends DatabaseCommand {
response.setStatus(HttpStatus.SC_OK);
String jsonStr = mapperObj.writeValueAsString(databaseInfo);
logger.info("QueryCommand::Post::Result::{} " ,jsonStr);
logger.debug("QueryCommand::Post::Result::{} " ,jsonStr);
writer.object();
writer.key("code"); writer.value("ok");

View File

@ -262,7 +262,7 @@ public class SavedConnectionCommand extends DatabaseCommand {
if(jdbcConfig.getDatabasePassword() != null) {
logger.info("SavedConnectionCommand::Post::password::{}", jdbcConfig.getDatabasePassword());
logger.debug("SavedConnectionCommand::Post::password::{}", jdbcConfig.getDatabasePassword());
jdbcConfig.setDatabasePassword(DatabaseUtils.encrypt(jdbcConfig.getDatabasePassword()));
}
@ -313,7 +313,7 @@ public class SavedConnectionCommand extends DatabaseCommand {
}
logger.info("SavedConnectionCommand::PUT Connection: {}", jdbcConfig.getConnectionName());
logger.debug("SavedConnectionCommand::PUT Connection: {}", jdbcConfig.getConnectionName());
if(jdbcConfig.getDatabasePassword() != null) {
jdbcConfig.setDatabasePassword(DatabaseUtils.encrypt(jdbcConfig.getDatabasePassword()));

View File

@ -54,7 +54,7 @@ public class TestConnectCommand extends DatabaseCommand {
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
logger.info("TestConnectCommand::Post");
logger.debug("TestConnectCommand::Post");
DatabaseConfiguration databaseConfiguration = getJdbcConfiguration(request);
logger.info("TestConnectCommand::Post::{}", databaseConfiguration);

View File

@ -55,7 +55,7 @@ public class TestQueryCommand extends DatabaseCommand {
@Override
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
logger.info("TestQueryCommand::Post");
logger.debug("TestQueryCommand::Post");
DatabaseConfiguration dbConfig = getJdbcConfiguration(request);
String query = request.getParameter("query");
@ -76,7 +76,7 @@ public class TestQueryCommand extends DatabaseCommand {
response.setStatus(HttpStatus.SC_OK);
String jsonStr = mapperObj.writeValueAsString(databaseInfo);
logger.info("TestQueryCommand::Post::Result::{} " ,jsonStr);
logger.debug("TestQueryCommand::Post::Result::{} " ,jsonStr);
writer.object();
writer.key("code");

View File

@ -71,7 +71,7 @@ public class MySQLConnectionManager {
*/
public static MySQLConnectionManager getInstance() throws DatabaseServiceException {
if (instance == null) {
logger.info("::Creating new MySQLConnectionManager ::");
logger.debug("::Creating new MySQLConnectionManager ::");
instance = new MySQLConnectionManager();
}
@ -141,7 +141,7 @@ public class MySQLConnectionManager {
connection = DriverManager.getConnection(dbURL, databaseConfiguration.getDatabaseUser(),
databaseConfiguration.getDatabasePassword());
logger.info("*** Acquired New connection for ::{} **** ", dbURL);
logger.debug("*** Acquired New connection for ::{} **** ", dbURL);
return connection;

View File

@ -143,7 +143,7 @@ public class PgSQLConnectionManager {
connection = DriverManager.getConnection(dbURL, databaseConfiguration.getDatabaseUser(),
databaseConfiguration.getDatabasePassword());
logger.info("*** Acquired New connection for ::{} **** ", dbURL);
logger.debug("*** Acquired New connection for ::{} **** ", dbURL);
return connection;