Outdated egg!
This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for the CHICKEN 5 version of this egg, if it exists.
If it does not exist, there may be equivalent functionality provided by another egg; have a look at the egg index. Otherwise, please consider porting this egg to the current version of CHICKEN.
syslog
Introduction
This egg provides access to the unix system logger using the syslog-api.
Examples
(use syslog) (syslog prio/notice "This is my notice. Hello ~A" "world")
Authors
License
Copyright (c) <2009> David Krentzlin <david@lisp-unleashed.de> 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.
Requirements
This egg does only work on unix-like os's that have the syslog-functions available.
Documentation
[procedure] (syslog priority fmt . args)Write a message to the syslogdaemon with the given priority. See priorities for a list of provided priority-constants.
[procedure] (openlog identity options facility)Open a connection to the system logger. Identity is prepended to every message. The option-argument specify flags which control the operation of openlog and subsequent calls to syslog. See options for a list of provided option-constants. Options can be or'ed together. Facility sets the facility the logmessages will have. See facilities for a list of provided facilities. The use of openlog is optional. You can use syslog right away without calling openlog.
[procedure] (closelog)Closes the connection to the system logger.
[procedure] (setlogmask maskpriority)This procedure sets the logmask for the calling process and returns the old logmask. You can use log-up-to to log upto a specified priority.
[procedure] (log-up-to priority)Returns a logmask that can be passed to setlogmask.
[procedure] (log-mask priority)Compatibility Notes
Solaris currently lacks the syslog,ftp and authpriv facilities. Those are mapped to other facilities like so:
facility/authpriv => facility/auth facility/syslog => facility/daemon facility/ftp => facility/daemon
Priorities/Levels
- prio/info
- prio/emerg
- prio/alert
- prio/crit
- prio/err
- prio/warning
- prio/notice
- prio/debug
Options for openlog
- opt/cons
- opt/ndelay
- opt/perror
- opt/pid
Facilities
- facility/auth
- facility/cron
- facility/daemon
- facility/kern
- facility/lpr
- facility/mail
- facility/news
- facility/user
- facility/uucp
- facility/local0
- facility/local1
- facility/local2
- facility/local3
- facility/local4
- facility/local5
- facility/local6
- facility/local7
- facility/authpriv
- facility/syslog
- facility/ftp