Simple logging system for Common Lisp; currently works only on sbcl, see other-CLs.org.
- The logging system must be as simple and robust as a hammer.
- It must support multi-threading and (sometimes simultaneously) receive messages from different lisp programs (e.g., services on a web server).
- It should be simpler and shorter than any of the projects that would need a logging system.
- One should never suspect that bugs in his/her projects arise from the logging system.
Examples of other CL log systems: log4cl, cl-log.
It is assumed that quicklisp is installed; emacs would help although it is not compulsory.
Configure the log system before launching the log:
Under root privileges:
adduser shalaev staff
mkdir /var/log/sbcl
chgrp staff /var/log/sbcl
chmod 770 /var/log/sbcl
where shalaev
should be replaced with your user name.
Unpack simple-log.tbz into your Quicklisp directory:
tar xjfv simple-log.tbz --directory=$HOME/quicklisp/local-projects/
Open quick-start.lisp and evaluate it in an interactive SBCL session.
(Requires emacs.)
In Makefile,
- set
SBCL
to the path of the sbcl binary, and - set
quicklispDir
to the directory where locally createdserver-log
package will be stored; then make
The make
command
- compiles the test to the small (13mb) binary and copies it to the current directory, and
- tests the code by running it in interpreting mode.
The compiled binary can be found in the generated/ directory.
Notes:
- Makefile requires
- emacs for generating the source code files in the generated/ directory from simple-log.org with the
M-x org-babel-tangle
command, and printangle
function defined in lisp-goodies/dot.emacs file.
- emacs for generating the source code files in the generated/ directory from simple-log.org with the
- Unless you have manually compiled sbcl with
sh make.sh --with-sb-core-compression
command, the resulting binary will be several times larger than 13mb.
- README.org generates
README.md
for notabug and github. - simple-log.org contains the code from
generated/*
together with explanations. - Makefile is needed to test the changes made to the code; it
- uses
emacs
to generate the source code from the.org
file, - launches example.lisp in interpreting mode, and
- compiles example.lisp into
generated/example.bin
. - creates simple-log.tbz
- uses
- other-CLs.org contains a note about making the code compatible with other CL dialects. (This does not seem to be hard.)
- helpers/* assist compilation.
This code is released under MIT license.