anchor.diff:  (defmacro %with-local-interrupts (&body body)
     #+sb-thread `(sb-sys:with-local-interrupts ,@body)
     #-sb-thread`(progn ,@body))
  +
  +(defun call-with-logged-problems (context thunk)
  +  (handler-case (funcall thunk)
  +    (error (condition)
  +      (log-error :logger +self-meta-logger+
  +                 "~@<Caught ~S during ~S: ~A; Continuing.~@:>"
  +                 (type-of condition) context condition))
  +    (warning (condition)
  +      (log-warn :logger +self-meta-logger+
  +                "~@<Caught ~S during configuration: ~A; Continuing.~@:>"
  +                (type-of condition) context condition))))
  +
  +(defmacro with-logged-problems (context &body body)
  +  `(call-with-logged-problems ',context (lambda () ,@body)))
   
   (defun start-hierarchy-watcher-thread ()
     (unless *watcher-thread*
  
positive.code: (defun stop-hierarchy-watcher-thread ()
    (let ((thread (with-hierarchies-lock *watcher-thread*)))
      (when thread
        (ignore-errors (bt::destroy-thread thread))
        (ignore-errors (bt:join-thread thread)))))
  
  (defun maybe-start-watcher-thread ()
    (with-hierarchies-lock
  
negative.code: 
  (defun save-hook ()
    "Flushes all existing appenders, and stops watcher thread"
    (with-logged-problems (save-hook :flush-all-appenders)
      (flush-all-appenders))
    (with-logged-problems (save-hook :flush-all-appenders)
      (save-all-appenders))
    (with-logged-problems (save-hook :stop-hierarch-watcher-thread)
      (stop-hierarchy-watcher-thread)))
  
  (defun exit-hook ()
    "Flushes all existing appenders"
    (with-logged-problems (exit-hook :flush-all-appenders)
      (flush-all-appenders)))
  
  (defun init-hook ()
    "Starts watcher thread if any existing appenders don't
  have :immediate-flush option"
    (with-logged-problems (init-hook :maybe-start-watch-thread)
      (maybe-start-watcher-thread))
    (with-logged-problems (init-hook :reinitialize-this-console-appender)
      (dolist (appender (all-appenders))
        (when (typep appender 'this-console-appender)
          (setf (slot-value appender 'stream) *global-console*)
          (reinitialize-instance appender)))))
  
  (defun all-appenders (&optional (all-hierarchies t))
    "Return all existing appenders in all hierarchies"
  