LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   apache access_log to printer (https://www.linuxquestions.org/questions/linux-software-2/apache-access_log-to-printer-44835/)

plisken 02-10-2003 12:09 PM

apache access_log to printer
 
Perhaps a wierd question, as in why would I wish to do this but...

How would I print out each additional line to be added to the access_log file, or indeed any log file?

Note: I don't simply wish to print out the complete file...

Thanks

bulliver 02-10-2003 03:29 PM

Quote:

each additional line to be added to the access_log file
What does that mean? Not sure what you are wanting to print.

plisken 02-11-2003 12:09 PM

When a new entry is amended to the log file, then this new entry would be printed.

So that every 24 hours or so i can simply tear off the printed paper and see the most recent additions to the log file.

Hope this helps...

bulliver 02-11-2003 12:43 PM

I see.

You could try creating a custom log in httpd.conf and instead of specifying a file, tell it to write directly to lp0, or whatever your printer device is...I'm not sure if it would work but you never know.

Other than that you would probably need a shell script to do it, or perhaps a Perl script. ie: run it as a cron job that runs every hour or 24 hours and only prints the new entries.

plisken 02-11-2003 05:54 PM

I'll spend a few hours on it at the weekend and post results here.

I was hoping that there would be some magical solution though;)

Thanks


All times are GMT -5. The time now is 09:47 AM.