mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-22 02:27:58 +01:00
Conditionally reduce severity of roster reload error logging
If the roster feature is not supported by the server, there's no need to log this at SEVERE log level.
This commit is contained in:
parent
4a83d2957e
commit
aafc24a966
1 changed files with 6 additions and 3 deletions
|
@ -469,11 +469,14 @@ public final class Roster extends Manager {
|
|||
@Override
|
||||
public void processException(Exception exception) {
|
||||
rosterState = RosterState.uninitialized;
|
||||
Level logLevel;
|
||||
Level logLevel = Level.SEVERE;
|
||||
if (exception instanceof NotConnectedException) {
|
||||
logLevel = Level.FINE;
|
||||
} else {
|
||||
logLevel = Level.SEVERE;
|
||||
} else if (exception instanceof XMPPErrorException) {
|
||||
Condition condition = ((XMPPErrorException) exception).getStanzaError().getCondition();
|
||||
if (condition == Condition.feature_not_implemented || condition == Condition.service_unavailable) {
|
||||
logLevel = Level.FINE;
|
||||
}
|
||||
}
|
||||
LOGGER.log(logLevel, "Exception reloading roster", exception);
|
||||
for (RosterLoadedListener listener : rosterLoadedListeners) {
|
||||
|
|
Loading…
Reference in a new issue