Logging improvements
This commit is contained in:
parent
a2dd90a4c2
commit
f4034661b8
@ -1,12 +1,12 @@
|
||||
/**
|
||||
* Copyright © 2016-2018 The Thingsboard Authors
|
||||
*
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* <p>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* 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.dao.attributes.AttributesService;
|
||||
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.ValidationCallback;
|
||||
import org.thingsboard.server.service.security.ValidationResult;
|
||||
@ -403,7 +404,11 @@ public class DefaultTelemetryWebSocketService implements TelemetryWebSocketServi
|
||||
|
||||
@Override
|
||||
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,
|
||||
FAILED_TO_FETCH_DATA);
|
||||
sendWsMsg(sessionRef, update);
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
</appender>
|
||||
|
||||
<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">
|
||||
<appender-ref ref="fileLogAppender"/>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user