[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
"SYSLOG"
Date: Wed, 27 Jun 90 09:48:36 EDT
From: jwalker@crl.dec.com
In one of the SLUG sessions, someone mentioned using a
facility they referred to as "SYSLOG" for finding out about
server errors. Since it was supposed to be a session for
heavy hackers, I figured that everyone except me knew about
it and decided to look it up in the documentation when I got
home. Silly me. I don't see anything documented that
sounds like what people were talking about. Could you
please give me some hints as to whether
whatever-this-is-if-it-exists would help with the following
problem.
I don't know of anything in Genera called "SYSLOG"; Unix has a syslog()
library routine, which can be configured to send logging messages to the
system console, a log file, and/or a network server.
Genera has something similar, in a system called Server Utilities. If
you've used the Store and Forward Mailer, its log window and log files
are maintained by this facility; I suspect the Print Spooler also uses
it. Unfortunately, it is completely undocumented; the source is in
SYS:SERVER-UTILITIES;LOG.LISP. Basically, you create a log flavor by
mixing together SU:BASIC-LOG and various SU:LOG-xxx-MIXIN flavors (there
are predefined mixins for logging to a window, logging to a file, using
TV:NOTIFY, and using NET:NOTIFY, but it should be relatively
straightforward to add your own mixins); the server instantiates one of
these logs and then calls SU:LOG-EVENT whenever it has anything to say.
The severity argument is used by the individual methods to decide
whether they should be triggered (this isn't as nice as the Unix
syslog(), which looks at a configuration file to determine the way that
a particular facility/severity should be reported).
I have a program that runs in the background and does file
I/O occasionally. If it runs into problems doing file I/O,
I don't want it to bother the user, just try again later.
But I would also like a way to find out about such problems
in case they are due to a bug rather than to some
availability problem. The users are at a different site so
I would most like to get mail about any difficulties. Do I
have to roll my own or is there something that people have
discovered?
I don't think the Server Utilities can help here. However, there is an
automatic bug-reporting mechanism in Genera which should probably fit
the bill. The source is in SYS:DEBUGGER;AUTO-BUG-REPORTER.LISP.
Basically, your server should bind DBG:*AUTOBUG-ENABLE* to T, and set up
an error handler that calls DBG:AUTOMATIC-BUG-REPORT. The autobug
facility looks pretty clever; in addition to sending a backtrace, it
also looks for interesting flavor instances and structure objects on the
stack and sends the output of DESCRIBE on them. It also tries to detect
similar errors so that you don't get inundated with redundant mail about
the multiple occurrances of the same problem.
You could also use the Server Utilities logging facility, by defining a
LOG-MAIL-MIXIN. This would allow you to receive informational messages
as well as error notifications. If you attempt this, I suggest that it
buffer informational events up so that you don't get lots of tiny
messages, but high-severity events should flush the buffer.
barmar