LinuxQuestions.org
Register a domain and help support LQ
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, 01:09 PM   #1
plisken
Member
 
Registered: Dec 2001
Location: Scotland
Distribution: Slackware 9.1/13.37/14 RedHat 6.2/7/EL6.5 SuSE 8.2/11.1
Posts: 471

Rep: Reputation: 30
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, 04: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, 01:09 PM   #3
plisken
Member
 
Registered: Dec 2001
Location: Scotland
Distribution: Slackware 9.1/13.37/14 RedHat 6.2/7/EL6.5 SuSE 8.2/11.1
Posts: 471

Original Poster
Rep: Reputation: 30
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, 01: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 01:44 PM.
 
Old 02-11-2003, 06:54 PM   #5
plisken
Member
 
Registered: Dec 2001
Location: Scotland
Distribution: Slackware 9.1/13.37/14 RedHat 6.2/7/EL6.5 SuSE 8.2/11.1
Posts: 471

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 02:22 PM
apache access_log questions shilo Linux - Software 9 06-07-2004 03:40 PM
apache access_log woes thew00t Linux - Software 1 02-23-2004 08:26 AM
apache access_log permissions mirage_3d Linux - Networking 2 12-06-2003 09:54 PM
Apache access_log question WorldBuilder Linux - Networking 7 11-01-2003 07:05 PM


All times are GMT -5. The time now is 10:47 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration