Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

He's using a content-type, but it's 'text/plain'. HTML tags would be a bad thing to do, if the file isn't going to be interpreted as HTML. (text/html, text/xhtml, text/xhtml+xml, etc)

The problem is, he's given us the code for what generates the log, and not for what displays it. I think you're right, in that it's being displayed as HTML, and not using HTML line endings. The easiest solution is to make sure that the browser is sending the correct mime headers when viewing the logs.

I'd probably also use common+ log format (aka. NCSA extended log format) , as it would allow you to use existing log analysis packages (eg, analog) for those pretty graphs that management likes

(well, I'd use the format, but I'd do it in the server, rather than generating a new process just to log)

Update: follow the link that dorward gave for the correct xhtml mime type


In reply to Re^2: log file formatting by jhourcle
in thread log file formatting by centrum

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-03-29 13:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found