Logging improvements
This commit is contained in:
		
							parent
							
								
									a2dd90a4c2
								
							
						
					
					
						commit
						f4034661b8
					
				@ -1,12 +1,12 @@
 | 
				
			|||||||
/**
 | 
					/**
 | 
				
			||||||
 * Copyright © 2016-2018 The Thingsboard Authors
 | 
					 * Copyright © 2016-2018 The Thingsboard Authors
 | 
				
			||||||
 *
 | 
					 * <p>
 | 
				
			||||||
 * Licensed under the Apache License, Version 2.0 (the "License");
 | 
					 * Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 * you may not use this file except in compliance with the License.
 | 
					 * you may not use this file except in compliance with the License.
 | 
				
			||||||
 * You may obtain a copy of the License at
 | 
					 * You may obtain a copy of the License at
 | 
				
			||||||
 *
 | 
					 * <p>
 | 
				
			||||||
 *     http://www.apache.org/licenses/LICENSE-2.0
 | 
					 * http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 *
 | 
					 * <p>
 | 
				
			||||||
 * Unless required by applicable law or agreed to in writing, software
 | 
					 * Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 * distributed under the License is distributed on an "AS IS" BASIS,
 | 
					 * distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
					 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
@ -37,6 +37,7 @@ import org.thingsboard.server.common.data.kv.ReadTsKvQuery;
 | 
				
			|||||||
import org.thingsboard.server.common.data.kv.TsKvEntry;
 | 
					import org.thingsboard.server.common.data.kv.TsKvEntry;
 | 
				
			||||||
import org.thingsboard.server.dao.attributes.AttributesService;
 | 
					import org.thingsboard.server.dao.attributes.AttributesService;
 | 
				
			||||||
import org.thingsboard.server.dao.timeseries.TimeseriesService;
 | 
					import org.thingsboard.server.dao.timeseries.TimeseriesService;
 | 
				
			||||||
 | 
					import org.thingsboard.server.dao.util.TenantRateLimitException;
 | 
				
			||||||
import org.thingsboard.server.service.security.AccessValidator;
 | 
					import org.thingsboard.server.service.security.AccessValidator;
 | 
				
			||||||
import org.thingsboard.server.service.security.ValidationCallback;
 | 
					import org.thingsboard.server.service.security.ValidationCallback;
 | 
				
			||||||
import org.thingsboard.server.service.security.ValidationResult;
 | 
					import org.thingsboard.server.service.security.ValidationResult;
 | 
				
			||||||
@ -403,7 +404,11 @@ public class DefaultTelemetryWebSocketService implements TelemetryWebSocketServi
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            @Override
 | 
					            @Override
 | 
				
			||||||
            public void onFailure(Throwable e) {
 | 
					            public void onFailure(Throwable e) {
 | 
				
			||||||
                log.error(FAILED_TO_FETCH_DATA, e);
 | 
					                if (e instanceof TenantRateLimitException || e.getCause() instanceof TenantRateLimitException) {
 | 
				
			||||||
 | 
					                    log.trace("[{}] Tenant rate limit detected for subscription: [{}]:{}", sessionRef.getSecurityCtx().getTenantId(), entityId, cmd);
 | 
				
			||||||
 | 
					                } else {
 | 
				
			||||||
 | 
					                    log.info(FAILED_TO_FETCH_DATA, e);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
                SubscriptionUpdate update = new SubscriptionUpdate(cmd.getCmdId(), SubscriptionErrorCode.INTERNAL_ERROR,
 | 
					                SubscriptionUpdate update = new SubscriptionUpdate(cmd.getCmdId(), SubscriptionErrorCode.INTERNAL_ERROR,
 | 
				
			||||||
                        FAILED_TO_FETCH_DATA);
 | 
					                        FAILED_TO_FETCH_DATA);
 | 
				
			||||||
                sendWsMsg(sessionRef, update);
 | 
					                sendWsMsg(sessionRef, update);
 | 
				
			||||||
 | 
				
			|||||||
@ -41,11 +41,11 @@
 | 
				
			|||||||
    </appender>
 | 
					    </appender>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <logger name="org.thingsboard.server" level="INFO" />
 | 
					    <logger name="org.thingsboard.server" level="INFO" />
 | 
				
			||||||
    <logger name="akka" level="INFO" />
 | 
					    <logger name="com.google.common.util.concurrent.AggregateFuture" level="OFF" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <root level="INFO">
 | 
					    <root level="INFO">
 | 
				
			||||||
        <appender-ref ref="fileLogAppender"/>
 | 
					        <appender-ref ref="fileLogAppender"/>
 | 
				
			||||||
        <appender-ref ref="STDOUT"/>
 | 
					        <appender-ref ref="STDOUT"/>
 | 
				
			||||||
    </root>
 | 
					    </root>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
</configuration>
 | 
					</configuration>
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user