[cups.general] tea4cups logging question

Ted Dively ted at groupd.com
Thu Nov 24 22:05:05 PST 2005


Greetings fellow listers!

On an Apple Xserve G4 running Mac OS X Server v.10.4.3, I've set up a  
CUPS backend called "tea4cups", which I want to use to provide more  
information about print jobs than the OS logs to /var/log/cups/ 
page_log. It's critical that tea4cups provide the job number and job  
title in its log so that it can be combined with /var/log/cups/ 
page_log to allow for more complete accounting. The config file is / 
etc/cups/tea4cups.conf, and I've got it working fine, except that I  
guess I'm not understanding how to properly use the echo command.  
Here's the relevant line from /etc/cups/tea4cups.conf:

prehook_accounting : echo $TEAPRINTERNAME $TEAUSER $TEAJOBID  
$TEATITLE $TEACOPIES $TEABILLING $TEACLIENTHOST > var/log/ 
printaccounting.log

What that line in the config file does is get some information about  
a print job, and echo it into /var/log/printaccounting.log, which  
then allows me to run the following from the shell as a periodic cron  
job:

/var/log/cups/page_log /var/log/printaccounting.log > /Users/ 
office_manager/Documents/combined-print-log.txt

The page_log file does _not_ include job titles, so this procedure  
allows the office manager to easily track all the information from  
both logs in order to properly account for all print jobs on all  
queues. However, the printaccounting.log file only ever contains a  
single line -- the information from the most recent print job -- so  
the combining of the two logs is meaningless. Forgive my ignorance,  
but can anyone tell me how to have tea4cups.conf output the desired  
data, as in the line I quoted above, but to have it _add_ data about  
each successive print job to the /var/log/printaccounting.log file?  
TIA for your guidance.

Ted Dively
--
Group D Communications
Technology Consulting -- IT, Databases, Software, Websites, Hosting
www.groupd.com
PH 415.701.8331
FX 415.701.8332
P.O. Box 170697
San Francisco, CA 94117-0697





More information about the cups mailing list