LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-10-2003, 12:09 PM   #1
plisken
Member
 
Registered: Dec 2001
Location: Scotland
Distribution: Slackware 9.1-15 RH 6.2/7, RHEL 6.5 SuSE 8.2/11.1, Debian 10.5
Posts: 516

Rep: Reputation: 32
Lightbulb 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
 
Old 02-10-2003, 03:29 PM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Quote:
each additional line to be added to the access_log file
What does that mean? Not sure what you are wanting to print.
 
Old 02-11-2003, 12:09 PM   #3
plisken
Member
 
Registered: Dec 2001
Location: Scotland
Distribution: Slackware 9.1-15 RH 6.2/7, RHEL 6.5 SuSE 8.2/11.1, Debian 10.5
Posts: 516

Original Poster
Rep: Reputation: 32
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...
 
Old 02-11-2003, 12:43 PM   #4
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
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.

Last edited by bulliver; 02-11-2003 at 12:44 PM.
 
Old 02-11-2003, 05:54 PM   #5
plisken
Member
 
Registered: Dec 2001
Location: Scotland
Distribution: Slackware 9.1-15 RH 6.2/7, RHEL 6.5 SuSE 8.2/11.1, Debian 10.5
Posts: 516

Original Poster
Rep: Reputation: 32
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to read the access_log of Apache? Kayaker Slackware 12 06-02-2009 01:22 PM
apache access_log questions shilo Linux - Software 9 06-07-2004 02:40 PM
apache access_log woes thew00t Linux - Software 1 02-23-2004 07:26 AM
apache access_log permissions mirage_3d Linux - Networking 2 12-06-2003 08:54 PM
Apache access_log question WorldBuilder Linux - Networking 7 11-01-2003 06:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration