Log levels
This commit is contained in:
		
							parent
							
								
									257f1a7ce7
								
							
						
					
					
						commit
						68cfbdeb1d
					
				@ -243,8 +243,8 @@ public class DefaultAlarmQueryRepository implements AlarmQueryRepository {
 | 
			
		||||
            }
 | 
			
		||||
            List<Map<String, Object>> rows = jdbcTemplate.queryForList(dataQuery, ctx);
 | 
			
		||||
            if (logSqlQueries) {
 | 
			
		||||
                log.error("QUERY: {}", dataQuery);
 | 
			
		||||
                Arrays.asList(ctx.getParameterNames()).forEach(param -> log.error("QUERY PARAM: {}->{}", param, ctx.getValue(param)));
 | 
			
		||||
                log.info("QUERY: {}", dataQuery);
 | 
			
		||||
                Arrays.asList(ctx.getParameterNames()).forEach(param -> log.info("QUERY PARAM: {}->{}", param, ctx.getValue(param)));
 | 
			
		||||
            }
 | 
			
		||||
            return AlarmDataAdapter.createAlarmData(pageLink, rows, totalElements, orderedEntityIds);
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
@ -338,8 +338,8 @@ public class DefaultEntityQueryRepository implements EntityQueryRepository {
 | 
			
		||||
                dataQuery = String.format("%s limit %s offset %s", dataQuery, pageLink.getPageSize(), startIndex);
 | 
			
		||||
            }
 | 
			
		||||
            if (logSqlQueries) {
 | 
			
		||||
                log.error("QUERY: {}", dataQuery);
 | 
			
		||||
                Arrays.asList(ctx.getParameterNames()).forEach(param -> log.error("QUERY PARAM: {}->{}", param, ctx.getValue(param)));
 | 
			
		||||
                log.info("QUERY: {}", dataQuery);
 | 
			
		||||
                Arrays.asList(ctx.getParameterNames()).forEach(param -> log.info("QUERY PARAM: {}->{}", param, ctx.getValue(param)));
 | 
			
		||||
            }
 | 
			
		||||
            List<Map<String, Object>> rows = jdbcTemplate.queryForList(dataQuery, ctx);
 | 
			
		||||
            return EntityDataAdapter.createEntityData(pageLink, selectionMapping, rows, totalElements);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user