Modificate mail debug
This commit is contained in:
parent
d52513cb59
commit
caeea4c779
@ -31,7 +31,7 @@ public class CommonConst {
|
|||||||
};
|
};
|
||||||
|
|
||||||
public static String[] forErrors = {
|
public static String[] forErrors = {
|
||||||
"syslogs@integry.it",
|
// "syslogs@integry.it",
|
||||||
"g.scorrano@integry.it",
|
"g.scorrano@integry.it",
|
||||||
"v.castellana@integry.it"
|
"v.castellana@integry.it"
|
||||||
};
|
};
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package it.integry.integrywmsnative.core.utility;
|
|||||||
|
|
||||||
import com.orhanobut.logger.Logger;
|
import com.orhanobut.logger.Logger;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.io.StringWriter;
|
import java.io.StringWriter;
|
||||||
import java.net.SocketException;
|
import java.net.SocketException;
|
||||||
@ -14,15 +15,15 @@ import it.integry.integrywmsnative.core.settings.SettingsManager;
|
|||||||
|
|
||||||
public class UtilityLogger {
|
public class UtilityLogger {
|
||||||
|
|
||||||
public static void logMe(String message){
|
public static void logMe(String message) {
|
||||||
StackTraceElement[] stackTraceElements = Thread.currentThread().getStackTrace();
|
StackTraceElement[] stackTraceElements = Thread.currentThread().getStackTrace();
|
||||||
|
|
||||||
String caller = "UtilityLogger";
|
String caller = "UtilityLogger";
|
||||||
|
|
||||||
for(int i = 0; i < stackTraceElements.length; i++){
|
for (int i = 0; i < stackTraceElements.length; i++) {
|
||||||
|
|
||||||
if(stackTraceElements[i].getMethodName().equalsIgnoreCase("logMe")){
|
if (stackTraceElements[i].getMethodName().equalsIgnoreCase("logMe")) {
|
||||||
caller = stackTraceElements[i+1].getFileName() + "->" + stackTraceElements[i+1].getMethodName();
|
caller = stackTraceElements[i + 1].getFileName() + "->" + stackTraceElements[i + 1].getMethodName();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -39,8 +40,9 @@ public class UtilityLogger {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void errorMe(Exception ex, String additionalText, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
public static void errorMe(Exception ex, String additionalText, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
if((!(ex instanceof SocketTimeoutException) && !(ex.getCause() instanceof SocketTimeoutException)) ||
|
if ((!(ex instanceof SocketTimeoutException) && !(ex.getCause() instanceof SocketTimeoutException)) ||
|
||||||
(!(ex instanceof SocketException) && !(ex.getCause() instanceof SocketException)) ) {
|
(!(ex instanceof SocketException) && !(ex.getCause() instanceof SocketException)) ||
|
||||||
|
(!(ex instanceof IOException) && !(ex.getCause() instanceof IOException))) {
|
||||||
|
|
||||||
String message = UtilityResources.readRawTextFile(R.raw.error_mail);
|
String message = UtilityResources.readRawTextFile(R.raw.error_mail);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user