in reply to Syslog conversion to HTML

It's not clear what you're asking for help with. What part do you not know how to proceed with? Converting a text file to HTML? Having a CGI script perform the conversion? Automating the conversion?

As to the first, if you're satisfied with the logs being displayed as plain text in a fixed width font, just slap a <pre> at the beginning and a </pre> at the end, with the usual HTML boilerplate around it, and it's converted into HTML and you're done. There are also a bazillion ways to parse the lines' contents and reformat them.

Replies are listed 'Best First'.
Re: Re: Syslog conversion to HTML
by ysth (Canon) on Jan 04, 2004 at 20:53 UTC
    I believe you also need to encode at least &, <, and >. You can do this with a simple s///g or with something like HTML::Entities (part of HTML-Parser).
Re: Re: Syslog conversion to HTML
by tilly (Archbishop) on Jan 04, 2004 at 23:31 UTC
    As was already pointed out, with pre you need to escape characters.

    Alternately you can declare the page to be of type text/plain and include the syslogs directly.