Migliorie log4j
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
This commit is contained in:
@@ -32,6 +32,7 @@ import it.integry.ems.service.dto.AttachmentDTO;
|
|||||||
import it.integry.ems.service.dto.EntityFieldDTO;
|
import it.integry.ems.service.dto.EntityFieldDTO;
|
||||||
import it.integry.ems.settings.Model.AvailableConnectionsModel;
|
import it.integry.ems.settings.Model.AvailableConnectionsModel;
|
||||||
import it.integry.ems.settings.Model.SettingsModel;
|
import it.integry.ems.settings.Model.SettingsModel;
|
||||||
|
import it.integry.ems.settings.SettingsController;
|
||||||
import it.integry.ems.sync.MultiDBTransaction.AdvancedDataSource;
|
import it.integry.ems.sync.MultiDBTransaction.AdvancedDataSource;
|
||||||
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
|
import it.integry.ems.sync.MultiDBTransaction.MultiDBTransactionManager;
|
||||||
import it.integry.ems.utility.UtilityDebug;
|
import it.integry.ems.utility.UtilityDebug;
|
||||||
@@ -127,6 +128,9 @@ public class EmsServices {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private MimeTypesHandler mimetypesFileTypeMap;
|
private MimeTypesHandler mimetypesFileTypeMap;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SettingsController settingsController;
|
||||||
|
|
||||||
public EntityImportResponse<List<EntityBase>> importEntity(String type, String format, ImportRequestDTO body, boolean headless) throws Exception {
|
public EntityImportResponse<List<EntityBase>> importEntity(String type, String format, ImportRequestDTO body, boolean headless) throws Exception {
|
||||||
logger.debug("Starting import [Type: " + type + ", Format: " + format + "]");
|
logger.debug("Starting import [Type: " + type + ", Format: " + format + "]");
|
||||||
String gestName = "IMPORT_" + type;
|
String gestName = "IMPORT_" + type;
|
||||||
@@ -826,7 +830,9 @@ public class EmsServices {
|
|||||||
if (UtilityDebug.isDebugExecution() || UtilityDebug.isIntegryServer())
|
if (UtilityDebug.isDebugExecution() || UtilityDebug.isIntegryServer())
|
||||||
throw new Exception("Cannot export server info in DEBUG mode");
|
throw new Exception("Cannot export server info in DEBUG mode");
|
||||||
|
|
||||||
List<AvailableConnectionsModel> availableConnectionList = settingsModel.getAvailableConnections(true);
|
|
||||||
|
List<AvailableConnectionsModel> availableConnectionList =
|
||||||
|
settingsModel.getAvailableConnectionsWithoutDuplicatedProfiles(true, settingsController.getHistoryProfileDb());
|
||||||
|
|
||||||
for (AvailableConnectionsModel model : availableConnectionList) {
|
for (AvailableConnectionsModel model : availableConnectionList) {
|
||||||
try {
|
try {
|
||||||
@@ -853,10 +859,6 @@ public class EmsServices {
|
|||||||
try {
|
try {
|
||||||
Properties jvmProperties = System.getProperties();
|
Properties jvmProperties = System.getProperties();
|
||||||
|
|
||||||
// String tomcatBase = jvmProperties.getProperty("catalina.base");
|
|
||||||
// String warPath = String.format("%s/webapps/ems-api.war", tomcatBase);
|
|
||||||
// File warFile = new File(warPath);
|
|
||||||
|
|
||||||
String domainname = System.getenv("USERDOMAIN");
|
String domainname = System.getenv("USERDOMAIN");
|
||||||
arguments.put("domainName", domainname);
|
arguments.put("domainName", domainname);
|
||||||
|
|
||||||
@@ -998,9 +1000,10 @@ public class EmsServices {
|
|||||||
|
|
||||||
|
|
||||||
List<AdvancedDataSource> db =
|
List<AdvancedDataSource> db =
|
||||||
Stream.of(data.getActiveConnections())
|
data.getActiveConnections().stream()
|
||||||
.filter(x -> UtilityString.equalsIgnoreCase(x.getDataSource().getProfile(), x.getDataSource().getDbName()) &&
|
.filter(x -> UtilityString.equalsIgnoreCase(x.getDataSource().getProfile(), x.getDataSource().getDbName()) &&
|
||||||
x.isInternalDb()).toList();
|
x.isInternalDb())
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
for (AdvancedDataSource dataSource : db) {
|
for (AdvancedDataSource dataSource : db) {
|
||||||
HashMap<String, Object> resultDbInfo = UtilityDB.executeSimpleQueryOnlyFirstRow(dataSource.getConnection(), sql);
|
HashMap<String, Object> resultDbInfo = UtilityDB.executeSimpleQueryOnlyFirstRow(dataSource.getConnection(), sql);
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<Property name="logPattern">%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1.1.9}.java:%L %X{username} - %m%n</Property>
|
<Property name="logPattern">%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1.1.9}.java:%L %X{username} - %m%n</Property>
|
||||||
<!-- Enhanced pattern to better show DEBUG information -->
|
<!-- Enhanced pattern to better show DEBUG information -->
|
||||||
<Property name="consolePattern">
|
<Property name="consolePattern">
|
||||||
[%highlight{%-5level}{FATAL=red blink, ERROR=red, WARN=yellow bold, INFO=black, DEBUG=green bold, TRACE=blue}] %d{yyyy-MM-dd HH:mm:ss} %style{%c{1.}}{cyan}: %msg%n%throwable
|
%d{yyyy-MM-dd HH:mm:ss} %style{%-40c{1.}}{cyan} %highlight{ %.-1p }{FATAL=bg_red blink black bold, ERROR=bg_red black, WARN=bright bg_yellow black, INFO=bg_green, DEBUG=bg_cyan black, TRACE=bg_white black} %highlight{%msg%n%throwable}{FATAL=red blink bold, ERROR=red, WARN=bright yellow, INFO=green, DEBUG=cyan, TRACE=white}
|
||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user