Skip to content

Commit

Permalink
Substitute e.printStackTrace() with log.error() in some classes
Browse files Browse the repository at this point in the history
  • Loading branch information
scwlkq committed Jan 20, 2024
1 parent 91a49d4 commit bbbf2a4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class ThreadWrapperTest {

@Test
Expand Down Expand Up @@ -74,7 +77,7 @@ public void run() {
try {
TimeUnit.MILLISECONDS.sleep(500);
} catch (InterruptedException e) {
e.printStackTrace();
log.error("[ThreadWrapper][shutdown] InterruptedException", e);
}
counter.set(100);
}
Expand Down Expand Up @@ -136,4 +139,4 @@ public void run() {
wrapper.setDaemon(daemon);
return wrapper;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ public void stop() {
try {
source.stop();
} catch (Exception e) {
e.printStackTrace();
log.error("source destroy error", e);
}
log.info("pollService stopping");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public void close() {
task.cancel(false);
super.close();
} catch (Exception e) {
e.printStackTrace();
log.error("PubClientImpl|{}|close|failed", clientNo, e);
}
}

Expand Down

0 comments on commit bbbf2a4

Please sign in to comment.