A logger is a way to have the system generate a text message and have that messaged saved somewhere for future review. Logging can be used as a debugging mechanism or for just reporting on the status of a system.
Logs are sent to a particular log category, each log category sends the messages it receives to its handlers. A handler's job is to take a message and write it somewhere. Log categories are organized in a hierarchy and messages sent to a log category will also be sent to that category's ancestors.
Each log category has a log level which is used to determine whether are particular message should be processed or not. Categories inherit their log level from their ancestors. If a category has multiple fathers its log level is the min of the levels of its fathers.
(eval-when (:compile-toplevel :load-toplevel :execute) (defconstant +dribble+ 0) (defconstant +debug+ 1) (defconstant +info+ 2) (defconstant +warn+ 3) (defconstant +error+ 4) (defconstant +fatal+ 5) (deflookup-table logger))
Method ((SETF LOG.LEVEL) T LOG-CATEGORY) Change the log level of CAT to NEW-LEVEL.
Class STREAM-LOG-APPENDER Human readable to the console logger.
Class FILE-LOG-APPENDER Logs to a file.
-*- lisp -*-
(in-package :it.bese.arnesi)