Skip to content

Commit 535163f

Browse files
Fix AgentLoggerLog4j.
1 parent 6815ce1 commit 535163f

2 files changed

Lines changed: 23 additions & 71 deletions

File tree

src/main/java/com/artur114/bytecodegrab/agent/AbortListener.java

Lines changed: 0 additions & 48 deletions
This file was deleted.

src/main/java/com/artur114/bytecodegrab/agent/AgentLoggerLog4j.java

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ public void warn(String log) {
1616
}
1717
try {
1818
this.logger.warn(log);
19-
} catch (Exception e) {
20-
down = true;
19+
} catch (Throwable e) {
20+
this.down = true;
2121
}
2222
}
2323

@@ -29,8 +29,8 @@ public void info(String log) {
2929
}
3030
try {
3131
this.logger.info(log);
32-
} catch (Exception e) {
33-
down = true;
32+
} catch (Throwable e) {
33+
this.down = true;
3434
}
3535
}
3636

@@ -42,8 +42,8 @@ public void error(String log) {
4242
}
4343
try {
4444
this.logger.error(log);
45-
} catch (Exception e) {
46-
down = true;
45+
} catch (Throwable e) {
46+
this.down = true;
4747
}
4848
}
4949

@@ -55,8 +55,8 @@ public void warn(String log, Object arg) {
5555
}
5656
try {
5757
this.logger.warn(log, arg);
58-
} catch (Exception e) {
59-
down = true;
58+
} catch (Throwable e) {
59+
this.down = true;
6060
}
6161
}
6262

@@ -68,8 +68,8 @@ public void info(String log, Object arg) {
6868
}
6969
try {
7070
this.logger.info(log, arg);
71-
} catch (Exception e) {
72-
down = true;
71+
} catch (Throwable e) {
72+
this.down = true;
7373
}
7474
}
7575

@@ -81,8 +81,8 @@ public void error(String log, Object arg) {
8181
}
8282
try {
8383
this.logger.error(log, arg);
84-
} catch (Exception e) {
85-
down = true;
84+
} catch (Throwable e) {
85+
this.down = true;
8686
}
8787
}
8888

@@ -94,8 +94,8 @@ public void warn(String log, Object... args) {
9494
}
9595
try {
9696
this.logger.warn(log, args);
97-
} catch (Exception e) {
98-
down = true;
97+
} catch (Throwable e) {
98+
this.down = true;
9999
}
100100
}
101101

@@ -107,7 +107,7 @@ public void info(String log, Object... args) {
107107
}
108108
try {
109109
this.logger.info(log, args);
110-
} catch (Exception e) {
110+
} catch (Throwable e) {
111111
down = true;
112112
}
113113
}
@@ -120,8 +120,8 @@ public void error(String log, Object... args) {
120120
}
121121
try {
122122
this.logger.error(log, args);
123-
} catch (Exception e) {
124-
down = true;
123+
} catch (Throwable e) {
124+
this.down = true;
125125
}
126126
}
127127

@@ -133,8 +133,8 @@ public void warn(String log, Object arg, Object arg1) {
133133
}
134134
try {
135135
this.logger.warn(log, arg, arg1);
136-
} catch (Exception e) {
137-
down = true;
136+
} catch (Throwable e) {
137+
this.down = true;
138138
}
139139
}
140140

@@ -146,8 +146,8 @@ public void info(String log, Object arg, Object arg1) {
146146
}
147147
try {
148148
this.logger.info(log, arg, arg1);
149-
} catch (Exception e) {
150-
down = true;
149+
} catch (Throwable e) {
150+
this.down = true;
151151
}
152152
}
153153

@@ -159,8 +159,8 @@ public void error(String log, Object arg, Object arg1) {
159159
}
160160
try {
161161
this.logger.error(log, arg, arg1);
162-
} catch (Exception e) {
163-
down = true;
162+
} catch (Throwable e) {
163+
this.down = true;
164164
}
165165
}
166166
}

0 commit comments

Comments
 (0)