logging

I implemented a custom WebSocketAppender for log4j. Log messages were escaped using String.escapeHtml4, newlines were replaced with <br>.
Depending on the log level, messages where printed in bold (WARNING) or in red (ERROR or FATAL).
Events that were considered a problem that needs the user's attention were explicitly stored in a collection, and written to the websocket at the end when the program was done.

ProgrammingLanguage:

Technology:

For a long running process on a website, provide the user with live feedback

We have a webtool (written in Java EE, using log4j for logging) where users can upload files that are then processed and migrated to a new version, which users can download. Since this process can take quite a while and might fail, users should have live information about the process. Even in case of an overall success there might be errors the users should be informed about.

Enable tarcing & message logging

Tracing is a specialized use of logging to record information about a program's execution. This information is typically used by programmers for debugging purposes, and additionally, depending on the type and detail of information contained in a trace log, by experienced system administrators or technical support personnel and software monitoring tools to diagnose common problems with software.
Subscribe to logging