Provide a log

Provide log by http

In a linux system, you may use a tool capable of providing a simple log to whoever wants to see.

We do this by copying an excerpt of a file of this log.

Normally these files are located in areas not accessible to the web server, so you have to find a tool to expose these paths to our users: developers in General. 

The tool

I devised this solution that committed to provide a log lets me decide what to expose with trivial filters. We write a shell command as follows

While true; do tail-n 100/var/log/apache2/ >/var/www/; sleep 2; done

to run it and leave it in memory, you can use many ways … the choice is yours.

  • nohup
  • screen
  • make a batch to run in the background

So it will be fine even save the command in a bath with our default shell, type bash. So that it runs without too many worries.


Some sources and articles that may interest you on the net are where you find an old but still valid article showing the basics of what I have written and where you can find interesting ideas about less conventional uses of the operating system.

Linux, log

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

Un progetto da realizzare?

Start up, think tank, idee da sviluppare in sistemi e software ...

© ICT360. All rights reserved. Powered by ICT360.