mirror of https://github.com/M66B/FairEmail.git
Added caller to extras
This commit is contained in:
parent
147290953d
commit
92aeb6d6ae
|
@ -207,10 +207,13 @@ public class Log {
|
|||
public static int w(Throwable ex) {
|
||||
if (BuildConfig.BETA_RELEASE)
|
||||
try {
|
||||
final StackTraceElement[] ste = new Throwable().getStackTrace();
|
||||
Bugsnag.notify(ex, new OnErrorCallback() {
|
||||
@Override
|
||||
public boolean onError(@NonNull Event event) {
|
||||
event.setSeverity(Severity.INFO);
|
||||
if (ste.length > 1)
|
||||
event.addMetadata("extra", "caller", ste[1].toString());
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
@ -223,10 +226,13 @@ public class Log {
|
|||
public static int e(Throwable ex) {
|
||||
if (BuildConfig.BETA_RELEASE)
|
||||
try {
|
||||
final StackTraceElement[] ste = new Throwable().getStackTrace();
|
||||
Bugsnag.notify(ex, new OnErrorCallback() {
|
||||
@Override
|
||||
public boolean onError(@NonNull Event event) {
|
||||
event.setSeverity(Severity.WARNING);
|
||||
if (ste.length > 1)
|
||||
event.addMetadata("extra", "caller", ste[1].toString());
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue