Create a log-message sender and add it to the list of active senders. Each sender has a name
, a category-spec, an output-spec and a class (with optional initialization arguments). The name
should be symbol and only one sender of any particular name can exist at a time.
The category-spec is a boolean combination of categories (see defcategory
). A sender will send any message whose message-category satisfies the sender's category-spec.
The output-spec is a list of outputs defined with defoutput
. You can also include strings and the special, predefined, outputs:
name
and stop it. If the sender is not active, then a sender-not-found-warning
will be signaled unless warn-if-not-found-p
is set to nil.
fatal error warn info trace dribble error+ warn+ info+ trace+ dribble+
Define a category named name
. This can be a simple category like
(defcategory :error)
(defcategory prize-allocation)
of a complex category like
(defcategory :bad-thing (or :error :warning :fatal))
(defcategory non-file-foo (and (or foo bar biz) (not file-access)))
Specifically, a simple category is just a name whereas a complex category is a boolean combination of other categories (either simple or complex). See category-specs
if you want a list of defined categories.
time category message
name
and a form
that will be called during logging to put something in the log file. You can specify a format
string (as in a call to format
) with the :format keyword argument. You can use the keyword :static? to indicate that the form's value will not change (e.g., the time of day is not static but the process id of the current Lisp is).
configure-from-file
to setup logging activitiy. Configuration-file looks in the user's home directory (using
user-homedir-pathname) and the directory specified by
default-pathname-defaults. The default is to use a file named "logging.config" but you can use the
:name and
:type parameters to customize this. If files exist in both directories, the
configuration-file will use the one in the home directory unless
:prefer-current-directory-p` is true.