From f4a3bbd5a915f83c42ff2351978f2e342a478b8a Mon Sep 17 00:00:00 2001 From: Hans Huebner Date: Wed, 29 Feb 2012 21:30:01 -0500 Subject: [PATCH] catch errors while writing to error log to prevent recursive locks --- acceptor.lisp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/acceptor.lisp b/acceptor.lisp index cb0a89b..3a5f69d 100644 --- a/acceptor.lisp +++ b/acceptor.lisp @@ -450,9 +450,13 @@ arguments.")) ACCEPTOR). FORMAT and ARGS are as in FORMAT. LOG-LEVEL is a keyword denoting the log level or NIL in which case it is ignored." (with-log-stream (stream (acceptor-message-log-destination acceptor) *message-log-lock*) - (format stream "[~A~@[ [~A]~]] ~?~%" - (iso-time) log-level - format-string format-arguments))) + (handler-case + (format stream "[~A~@[ [~A]~]] ~?~%" + (iso-time) log-level + format-string format-arguments) + (error (e) + (ignore-errors + (format *trace-output* "error ~A while writing to error log, error not logged~%" e)))))) (defun log-message* (log-level format-string &rest format-arguments) "Convenience function which calls the message logger of the current -- 2.11.4.GIT