logging improvements
This commit is contained in:
		
							parent
							
								
									d7be38d3cf
								
							
						
					
					
						commit
						231508b66b
					
				@ -21,6 +21,7 @@ import io.swagger.annotations.ApiModel;
 | 
			
		||||
import io.swagger.annotations.ApiModelProperty;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import lombok.EqualsAndHashCode;
 | 
			
		||||
import lombok.ToString;
 | 
			
		||||
import lombok.extern.slf4j.Slf4j;
 | 
			
		||||
import org.thingsboard.server.common.data.device.profile.DeviceProfileData;
 | 
			
		||||
import org.thingsboard.server.common.data.id.DashboardId;
 | 
			
		||||
@ -39,6 +40,7 @@ import static org.thingsboard.server.common.data.SearchTextBasedWithAdditionalIn
 | 
			
		||||
 | 
			
		||||
@ApiModel
 | 
			
		||||
@Data
 | 
			
		||||
@ToString(exclude = {"image", "profileDataBytes"})
 | 
			
		||||
@EqualsAndHashCode(callSuper = true)
 | 
			
		||||
@Slf4j
 | 
			
		||||
public class DeviceProfile extends SearchTextBased<DeviceProfileId> implements HasName, HasTenantId, HasOtaPackage {
 | 
			
		||||
 | 
			
		||||
@ -29,7 +29,7 @@ import java.util.UUID;
 | 
			
		||||
 | 
			
		||||
@Value
 | 
			
		||||
@EqualsAndHashCode(callSuper = true)
 | 
			
		||||
@ToString(callSuper = true)
 | 
			
		||||
@ToString(callSuper = true, exclude = "image")
 | 
			
		||||
public class DeviceProfileInfo extends EntityInfo {
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(position = 3, value = "Either URL or Base64 data of the icon. Used in the mobile application to visualize set of device profiles in the grid view. ")
 | 
			
		||||
 | 
			
		||||
@ -125,7 +125,7 @@ public class DefaultTbApiUsageClient implements TbApiUsageClient {
 | 
			
		||||
        }));
 | 
			
		||||
 | 
			
		||||
        if (!report.isEmpty()) {
 | 
			
		||||
            log.info("Reporting API usage statistics for {} tenants and customers", report.size());
 | 
			
		||||
            log.debug("Reporting API usage statistics for {} tenants and customers", report.size());
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -18,6 +18,7 @@ package org.thingsboard.server.transport.lwm2m.server.client;
 | 
			
		||||
import lombok.EqualsAndHashCode;
 | 
			
		||||
import lombok.Getter;
 | 
			
		||||
import lombok.Setter;
 | 
			
		||||
import lombok.ToString;
 | 
			
		||||
import lombok.extern.slf4j.Slf4j;
 | 
			
		||||
import org.eclipse.leshan.core.model.ObjectModel;
 | 
			
		||||
import org.eclipse.leshan.core.model.ResourceModel;
 | 
			
		||||
@ -64,6 +65,7 @@ import static org.thingsboard.server.transport.lwm2m.server.LwM2mTransportUtil.g
 | 
			
		||||
 | 
			
		||||
@Slf4j
 | 
			
		||||
@EqualsAndHashCode(of = {"endpoint"})
 | 
			
		||||
@ToString(of = "endpoint")
 | 
			
		||||
public class LwM2mClient implements Serializable {
 | 
			
		||||
 | 
			
		||||
    private static final long serialVersionUID = 8793482946289222623L;
 | 
			
		||||
 | 
			
		||||
@ -1184,7 +1184,7 @@ public class DefaultTransportService implements TransportService {
 | 
			
		||||
 | 
			
		||||
    @Scheduled(fixedDelayString = "${transport.stats.print-interval-ms:60000}")
 | 
			
		||||
    public void printStats() {
 | 
			
		||||
        if (statsEnabled) {
 | 
			
		||||
        if (statsEnabled && !statsMap.isEmpty()) {
 | 
			
		||||
            String values = statsMap.entrySet().stream()
 | 
			
		||||
                    .map(kv -> kv.getKey() + " [" + kv.getValue() + "]").collect(Collectors.joining(", "));
 | 
			
		||||
            log.info("Transport Stats: {}", values);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user