What can I use instead of printStackTrace?
What can I use instead of printStackTrace? 7 Answers. It means you should use logging framework like logback or log4j and instead of printing exceptions directly: e. printStackTrace(); Why is printStackTrace bad? printStackTrace() is not thread-safe. There is no synchronization mechanism to synchronize the writing of the stack trace to System. Does printStackTrace throw exception? […]