[syslog-ng]Making Logs Viewable as a Webpage
Bradley Hartin
bhartin@straus-frank.com
Wed, 9 Jan 2002 20:52:31 -0600 (CST)
On Wed, 9 Jan 2002, Aaron Brown wrote:
>
> First off, Congrats on making an awesome utility. I've used it in 2
> nationwide networks utilizing over 200 Routers, servers and network
> appliances and its run rock solid. But I would like to make the logs
> viewable via a webpage for security purposes. Unfortunately the Logs
> come out as a continuous line when viewed as html. Basically I'd like
> to be able to add a html page break ,<br>, to the end of each log
> message as they are written. I'm sure its an easy fix, but I am by no
> means a programmer. If possible could you tell me which src file and
> line that holds the command that writes the actual syslog message to
> the file. Any help would be appreciated.
After the run, you could just cat $logfile | sed 's/$/<BR>/g', and
prepend/append the necessary html. It would be easy to add within your
backup script. The other option, if you must view it as html as it is
running, would be to background the mondo-archive process, and run through
a "tail -f $logfile | while read INPUT; do"...process to dump it out a
line at a time to a file (although being html, I doubt this would be the
case you're after).
--
Bradley Hartin - bhartin@straus-frank.com
Communications and Network Administrator
Straus-Frank Company