> From [EMAIL PROTECTED] Wed Jul 7 14:24:26 2004
> Date: Tue, 06 Jul 2004 16:54:49 -0700
> To: [EMAIL PROTECTED], [EMAIL PROTECTED]
> From: Simon Matthews <[EMAIL PROTECTED]>
> Subject: Re: LPRng: Logging to syslog?
>
> At 09:30 AM 7/3/04 -0700, Patrick Powell wrote:
> > > From [EMAIL PROTECTED] Thu Jul 1 15:59:51 2004
> > > Date: Wed, 30 Jun 2004 15:03:41 -0700
> > > To: [EMAIL PROTECTED]
> > > From: Simon Matthews <[EMAIL PROTECTED]>
> > > Subject: LPRng: Logging to syslog?
> > >
> > > Can lprng log via a normal syslog daemon listening on udp/515? If
> so,
> > > how
> > > do I set the facility and log level?
> > >
> > > Simon
> >
> >LPRng sends various log message to the syslogd using the 'syslog()' C
> >interface. The communication link may actually be a UNIX socket,
> rather
> >than a TCP/IP network connection.
> >
> >What log messages are you trying to record?
>
> Files printed, debug information, etc. It would be a start if I knew
> what
> facility is used by lprng, so I could see where syslog is putting it.
>
> Simon
Look in the Printing Cookbook. There is a short summary. But:
a) use lpq -L to see the 'latest' information for a print queue.
Derived from:
spool directory (:sd)
printer control file (control.pr) - current printer/queue status
print queue actions log: status.pr
print filter: status
error and diagnostic log file: log
The lpq -L shows all but the log file - there is 'security' sensitive
information in the log file that is really not safe to be displayed.
b) The 'syslog' entries are really for the top level 'lpd' process and
for
really strange problems encountered while attempting to do a printing
operation.
If your syslog support has LOG_LPR then we syslog to LOG_LPR
else we syslog to LOCAL0
#ifdef LOG_LPR
# define SYSLOG_FACILITY LOG_LPR
#else
# ifdef LOG_LOCAL0
# define SYSLOG_FACILITY LOCAL0
# else
# define SYSLOG_FACILITY (0) /* for Ultrix -- facilities aren't
supported */
# endif
#endif
Here are the levels, and the usual conditions
LOG_CRIT - absolutely catastrophic error or problem - LPD almost
certainly dies
LOG_ALERT - bad, really bad. LPD limps on, more than likely dies
LOG_ERR - serious problem, usually on a spool queue.
LPD may give up servicing particular spool queue.
LOG_INFO - some unusual problem, condition, whatever. Usually spool
queue
related. Operation usually retried. Usually transitory in
nature,
but system related. Most commonly seen on heavily loaded
systems
when process cannot open socket, name resolution fails,
etc.
Information is put in queue log file, but also into syslog
for more 'permanent' record of a failure condition.
LOG_NOTICE - (same as INFO)
LOG_DEBUG - debug information, use syslog as log file not available.
Patrick Powell Astart Technologies
[EMAIL PROTECTED] 6741 Convoy Court
Network and System San Diego, CA 92111
Consulting 858-874-6543 FAX 858-751-2435
LPRng - Print Spooler (http://www.lprng.com)
-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRng MAILING LIST
The address you post from or your Reply-To address MUST be your
subscription address
If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.
To subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
with: | example:
subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
If you have major problems, call Patrick Powell or one of the friendly
staff at Astart Technologies for help. Astart also does support for LPRng.
Also, check the Web Page at: http://www.lprng.com for any announcements.
Astart Technologies (LPRng - Print Spooler http://www.lprng.com)
6741 Convoy Court
San Diego, CA 92111
858-874-6543 FAX 858-751-2435
-----------------------------------------------------------------------------