chickadee » syslog

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

David Krentzlin

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

syslog priority fmt #!rest argsprocedure

Write a message to the syslogdaemon with the given priority. See priorities for a list of provided priority-constants.

openlog identity options facilityprocedure

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.

closelogprocedure

Closes the connection to the system logger.

setlogmask maskpriorityprocedure

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.

log-up-to priorityprocedure

Returns a logmask that can be passed to setlogmask.

log-mask priorityprocedure

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

Options for openlog

Facilities

Versionhistory

Contents »