enlivend ([info]enlivend) wrote,
@ 2007-06-29 18:03:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
Current music:Another Setting (Durutti Column)
Entry tags:common lisp, library, logging

CL-LOG - a general purpose logging utility

CL-LOG is a general purpose logging utility, loosely modelled in some respects after Gary King's Log5.

Its features include:

  • logging to several destinations at once, via "messengers",
  • each messenger is tailored to accept some log messages and reject others, and this tailoring can be changed on-the-fly,
  • very rapid processing of messages which are rejected by all messengers,
  • support for messengers which cl:format text to a stream,
  • support for messengers which do not invoke cl:format,
  • timestamps in theory accurate to internal-time-units-per-second.

Typically, logging utilities only support the one, simple paradigm of formatting objects to a text-stream. Removing this restriction allows you to:

  • log random objects instead of plain text,
  • generate internationalized log messages,
  • create specialised binary logs,
  • base the test-suite of complex applications around logging.

Logging is controlled by the following classes: log-manager, base-messenger, base-message; any of these might be specialised by your application. Whether or not a messenger will accept a given message is controlled by the "categories" of both the messenger and message; categories are logical combinations of atoms (typically keywords).

CL-LOG is released with an MIT-style license.



(Post a new comment)


[info]nickbarnes
2007-06-29 10:32 pm UTC (link)
w00t!

(Reply to this)

thank you!
[info]cmm
2007-06-30 06:54 pm UTC (link)
/me notes some useful little bits:

. ORF (although there is at least one place where it is quite conspicuously *not* used! :))
. use of *FEATURES* to globally tweak behavior (never thought of the possibility before)
. there was something else but I forget what...

also, the code is just so nicely presented!

(Reply to this)(Thread)

Re: thank you!
[info]enlivend
2007-07-01 08:09 am UTC (link)
. ORF (although there is at least one place where it is quite conspicuously *not* used! :))

There is? Where?

. use of *FEATURES* to globally tweak behavior (never thought of the possibility before)

If you mean the (member :no-logging *features*), I think that's one of Gary King's ideas

. there was something else but I forget what...

It'll come to you...

-n

(Reply to this)(Parent)(Thread)

Re: thank you!
[info]cmm
2007-07-01 09:21 am UTC (link)
> Where?

::blink::
sorry, never mind me.  must have had too much beer yesterday.

(Reply to this)(Parent)


[info]limeodor
2007-07-02 05:34 pm UTC (link)
A couple years ago I worked on a project where I learned that if your logging framework can't at least handle images, it's not really as general as they say it is.

(Reply to this)(Thread)

Handling images?
[info]enlivend
2007-07-03 09:19 am UTC (link)
Why not? You might have to write a method on messenger-send-message to describe how the image is logged, but one of the points of CL-LOG is that you can log anything

(Reply to this)(Parent)

Hola mardena
(Anonymous)
2007-08-05 08:54 am UTC (link)
Hola mardena!
falikotrepat

(Reply to this)

Why cl-log isn't an extension of log5 ?
(Anonymous)
2007-10-30 01:51 pm UTC (link)
I'm trying to choose between cl-log and log5.

Why didn't you extend log5, was it due to a technical problem ?

Michel Bagnol
http://www.nodewave.com

(Reply to this)(Thread)

Re: Why cl-log isn't an extension of log5 ?
[info]enlivend
2007-11-22 07:37 pm UTC (link)
Gosh, it all seems like ancient history now.

I think the answer is that I reckoned it would be easier my meet my requirements if I started afresh. I made a point of retaining / extending as many features of cl-log as I could. Gary and I have corresponded somewhat over this, and at some point we might manage to meet up and see whether a (possibly partial) merge of the the code lines is possible.

(Reply to this)(Parent)


Create an Account
Forgot your login?
Login w/ OpenID
English • Español • Deutsch • Русский…