in reply to Printing the last few lines of the Error log

I have always been partial to File::ReadBackwards.

UPDATE:
If you are getting what i think you are getting at, the Unix 'tail' command is a must for watching debug statements in your web server error log. Use the -f option which ouputs the appended data. I usually keep a terminal open right next to my browser for such occasions.

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
F--F--F--F--F--F--F--F--
(the triplet paradiddle)
  • Comment on (jeffa) Re: Printing the last few lines of the Error log

Replies are listed 'Best First'.
Re: (jeffa) Re: Printing the last few lines of the Error log
by tomhukins (Curate) on Nov 20, 2001 at 15:09 UTC

    I agree that running tail on error logs is a useful development technique, but I would never do this on a live server.

    tail doesn't check its output, so a malicious visitor to your Web site could send dangerous escape codes to your terminal. xterm, for example, has various features/vulnerabilities that are based on escape codes. This assumes that someone wants to attack your Web server and either knows or guesses that you are running tail on your error log, but it's always worth protecting against untrusted data on the Internet.

      I just want to make the observation that this warning about the side effects of tail reflects the amazing depth and quality of answers that I have come to expect from PerlMonks. I'm impressed that someone would have provided such an insightful response to a basic question.

      Dave Aiello
      Chatham Township Data Corporation