Answer ruffy warnings.

(cherry picked from commit b73a822)
This commit is contained in:
Johannes Mockenhaupt 2018-01-31 02:01:06 +01:00
parent 4defd40023
commit 8be8f961ae
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -69,13 +69,21 @@ public class RuffyScripter implements RuffyCommands {
@Override
public void log(String message) throws RemoteException {
if (log.isTraceEnabled()) {
log.debug("Ruffy says: " + message);
log.trace("Ruffy says: " + message);
}
}
@Override
public void fail(String message) throws RemoteException {
log.warn("Ruffy warns: " + message);
if (message.startsWith("no connection possible"))
Answers.getInstance().logCustom(new CustomEvent("ComboRuffyWarning").putCustomAttribute("message", "no connection possible"));
else if (message.startsWith("Error sending keep alive while rtModeRunning is still true"))
Answers.getInstance().logCustom(new CustomEvent("ComboRuffyWarning").putCustomAttribute("message", "Error sending keep alive while rtModeRunning is still true"));
else if (message.startsWith("Error sending keep alive. rtModeRunning is false, so this is most likely a race condition during disconnect"))
Answers.getInstance().logCustom(new CustomEvent("ComboRuffyWarning").putCustomAttribute("message", "Error sending keep alive. rtModeRunning is false, so this is most likely a race condition during disconnect"));
else
Answers.getInstance().logCustom(new CustomEvent("ComboRuffyWarning").putCustomAttribute("message", message.substring(0, 98)));
}
@Override