/[log4cl]/log4cl/appender-syslog.lisp
ViewVC logotype

Contents of /log4cl/appender-syslog.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Mon Mar 1 18:06:09 2004 UTC (10 years, 1 month ago) by mbaringer
Branch: MAIN
CVS Tags: HEAD
Initial version, simply contains code ripped from appender.lisp
1 ;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
2
3 ;;;; *************************************************************************
4 ;;;; FILE IDENTIFICATION
5 ;;;;
6 ;;;; Name: appender.lisp
7 ;;;; Purpose: Different appender to log message
8 ;;;; Developers : Nicolas Lamirault <lam@tuxfamily.org>
9 ;;;;
10 ;;;; This file, part of log4cl, is Copyright (c) 2003 by Nicolas Lamirault
11 ;;;;
12 ;;;; log4cl users are granted the rights to distribute and use this software
13 ;;;; as governed by the terms of the Lisp Lesser GNU Public License
14 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
15 ;;;;
16 ;;;; $Id
17 ;;;;
18 ;;;; *************************************************************************
19
20 (in-package :log4cl)
21
22 ;; ---------------------
23 ;; Appender with syslog
24 ;; ---------------------
25
26 (defclass syslog-appender (appender)
27 ())
28
29 (defmethod log-msg ((appender syslog-appender) name level message)
30 "Log a message with Syslog"
31 (progn
32 (openlog name LOG_CONS LOG_LOCAL7)
33 (syslog LOG_INFO (format-log-message (appender-layout appender) "" level message))))

  ViewVC Help
Powered by ViewVC 1.1.5