[Bug 97] New: Avoid printing stack traces under certain conditions

http://bugzilla.qos.ch/show_bug.cgi?id=97 Summary: Avoid printing stack traces under certain conditions Product: logback-classic Version: unspecified Platform: PC OS/Version: Windows Status: NEW Severity: enhancement Priority: P1 Component: Other AssignedTo: logback-dev@qos.ch ReportedBy: noreply.ceki@qos.ch It would be useful if under certain very specific conditions, logback avoided printing stack traces. In particular, in server applications IOEXceptions are thrown under normal conditions, such as when the client closes its connection to the server. Typical code would look like: try { event = (AuditEvent) ois.readObject(); } catch (java.io.EOFException e) { logger.info("Caught java.io.EOFException closing connection.", e); break; } catch (IOException e) { logger.info("Caught java.io.IOException: ", e); break; } catch (ClassNotFoundException e) { logger.error("Unexpected ClassNotFoundException.", e); writeResponse(e); break; } Most of the time we would like to avoid printing the stack trace for the two exceptions but not the third. Possible solution: Marker ignoreST = MarkerFactgory.getMarker("IGNORE_STACK_TRACE"); logger.info(ignoreST, "Caught java.io.EOFException closing connection.", e); Note that even if most of the time we would like to avoid printing the stack trace, it should still be possible to allow st printing by overriding some parameter. -- Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.

http://bugzilla.qos.ch/show_bug.cgi?id=97 noreply.ceki@qos.ch changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P1 |P3 -- Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
participants (1)
-
bugzilla-daemon@pixie.qos.ch