anchor.diff:       (setf *received-keepalive-p* nil)
        (cl-irc:ping conn "keepalive"))))
   
  -(defun make-orcabot-instance (config)
  +(defun make-orcabot-instance (data-dir &key log-to-stdoutp)
     (lambda ()
  -    (let ((*quitting* nil)
  -          (*random-state* (make-random-state t))
  -          (babel::*suppress-character-coding-errors* t)
  -          (*event-base* (make-instance 'iolib:event-base))
  -          (*received-keepalive-p* t))
  +    (let* ((*quitting* nil)
  +           (*random-state* (make-random-state t))
  +           (babel::*suppress-character-coding-errors* t)
  +           (*event-base* (make-instance 'iolib:event-base))
  +           (*received-keepalive-p* t)
  +           (*orcabot-data-root-pathname* data-dir)
  +           (config (read-orcabot-config)))
  +      (local-time:enable-read-macros)
         (setf (log:log-manager)
               (make-instance 'log:log-manager :message-class 'log:formatted-message))
  -      (log:start-messenger 'log:text-stream-messenger
  -                           :name 'stdout
  -                           :stream *standard-output*)
  +      (when log-to-stdoutp
  +        (log:start-messenger 'log:text-stream-messenger
  +                             :name 'stdout
  +                             :stream *standard-output*))
         (log:start-messenger 'log:text-file-messenger
                              :name 'tofile
                              :filename (data-path "orcabot.log"))
  
positive.code: 
  (defun read-orcabot-config ()
    (let ((*package* (find-package "ORCABOT")))
      (with-open-file (inf (data-path "config.lisp")
                           :direction :input)
        (loop for form = (read inf nil)
  
negative.code:          collect form))))
  
  (defun background-orcabot-session (data-dir)
    (start-process (make-orcabot-instance data-dir)
                   (format nil "orcabot-handler-~D" (incf *process-count*))))
  
  (defun start-orcabot-session (data-dir)
    (funcall (make-orcabot-instance data-dir :log-to-stdoutp t)))
  
  