|
@@ -24,11 +24,24 @@ public class JitsiMeetLogger {
|
24
|
24
|
}
|
25
|
25
|
|
26
|
26
|
public static void addHandler(JitsiMeetBaseLogHandler handler) {
|
27
|
|
- Timber.plant(handler);
|
|
27
|
+ if (!Timber.forest().contains(handler)) {
|
|
28
|
+ try {
|
|
29
|
+ Timber.plant(handler);
|
|
30
|
+ } catch (Throwable t) {
|
|
31
|
+ Timber.w(t, "Couldn't add log handler");
|
|
32
|
+ }
|
|
33
|
+
|
|
34
|
+ }
|
28
|
35
|
}
|
29
|
36
|
|
30
|
37
|
public static void removeHandler(JitsiMeetBaseLogHandler handler) {
|
31
|
|
- Timber.uproot(handler);
|
|
38
|
+ if (Timber.forest().contains(handler)) {
|
|
39
|
+ try {
|
|
40
|
+ Timber.uproot(handler);
|
|
41
|
+ } catch (Throwable t) {
|
|
42
|
+ Timber.w(t, "Couldn't remove log handler");
|
|
43
|
+ }
|
|
44
|
+ }
|
32
|
45
|
}
|
33
|
46
|
|
34
|
47
|
public static void v(String message, Object... args) {
|