I am trying to find a centralized way to display errors to the user while logging them. Want to display the whole error message as it is written to the log without any customization. We are using log4j to log the errors and want to do minimal changes to the code.
Asked
Active
Viewed 59 times
0
-
How do users interact with your program? Is it a swing application, a website, a command line utility etc – beresfordt Feb 21 '15 at 21:42
-
Its a website. The front end is developed using javascript and HTML5. – Anonymous Feb 21 '15 at 21:46
-
And what have you tried so far to present the error to the user? – beresfordt Feb 21 '15 at 21:47
-
Currently, we are handling it in each class while writing the error to the log. – Anonymous Feb 21 '15 at 21:52
1 Answers
0
Make a custom Appender
as can be seen here. Add the Appender
to your Logger
and get notified about logging events and do with them whatever you want to.

Community
- 1
- 1

Flying Swissman
- 818
- 2
- 14
- 39