java - How to print the exception in different color -


is there way in java print entire exception message (including stack-trace) in different color (for example in red) . reason being, showcase fatal error/exception in different way. if exception message prints in same way general log prints , it's difficult trace actual exception compare log.

please suggest on how that. there different way , please suggest

regards

the recommended practice print error messages system.err, , normal output system.out. modern terminal applications configured display text coming stderr in red color, distinguishing normal output.

if not enough (but hope is), alternative suggested @siguza use ansi colors, demonstrated in this other answer.


Comments