Function: proced-log
proced-log is a byte-compiled function defined in proced.el.gz.
Signature
(proced-log LOG &rest ARGS)
Documentation
Log a message or the contents of a buffer.
If LOG is a string and there are more args, it is formatted with those ARGS. Usually the LOG string ends with a \n. End each bunch of errors with (proced-log t signal): this inserts the current time, buffer and signal at the start of the page, and \f (formfeed) at the end.
Source Code
;; Defined in /usr/src/emacs/lisp/proced.el.gz
;; similar to `dired-log'
(defun proced-log (log &rest args)
"Log a message or the contents of a buffer.
If LOG is a string and there are more args, it is formatted with
those ARGS. Usually the LOG string ends with a \\n.
End each bunch of errors with (proced-log t signal):
this inserts the current time, buffer and signal at the start of the page,
and \\f (formfeed) at the end."
(let ((obuf (current-buffer)))
(with-current-buffer (get-buffer-create proced-log-buffer)
(goto-char (point-max))
(let (buffer-read-only)
(cond ((stringp log)
(insert (if args
(apply #'format-message log args)
log)))
((bufferp log)
(insert-buffer-substring log))
((eq t log)
(backward-page 1)
(unless (bolp)
(insert "\n"))
(insert (current-time-string)
(format-message "\tBuffer `%s', signal `%s'\n"
(buffer-name obuf) (car args)))
(goto-char (point-max))
(insert "\f\n")))))))