You are looking at historical revision 20471 of this page. It may differ significantly from its current revision.
A logging library based on the ideas of CL's log5
(use log5scm syslog) (define-category info) (define-category debug) (define-category warn) (define-category warn+ (or info debug warn)) (define-category controller) (define-category model) (define-category app (or controller model)) (define-output model-out "model-out") (define-output controller-out "controller-out") (define-output app-out "app-out") ;;start port senders (start-sender model-sender (port-sender (current-error-port)) (output (model-out message)) (category model)) (start-sender controller-sender (port-sender (current-error-port)) (output (controller-out message)) (category controller)) (start-sender app-sender (port-sender (current-error-port)) ( output (app-out message)) (category app)) ;;additionally send every warning to syslog (start-sender syslog-warn (syslog-sender "test" opt/pid facility/local0 prio/warning) (category warn)) (log-for (model warn) "just a ~A" "Test") (log-for (app) "nother Test")
Copyright (c) 2010 David Krentzlin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.