[erlang-questions] Clarification inets httpd mod_log output issue

Ingela Anderton Andin <>
Tue May 13 11:15:38 CEST 2008


Hi!

I just want to clarify this issue.

When it comes to HTTP logs there are access and error logs. Access logs 
have a predefined format defined by the common log format
and this is followed by inets.  When it comes to the error log the 
format is  not strictly defined.
Inets provides a pretty and a compact representation where the pretty is 
"standard  Erlang indentation" and compact
is the same information but on only one line.

The real problem here is that currently there is no way in erlang io_lib 
to write a entry
with ~p semantics that will have no newline.  That is why the assumption 
was made that sometimes
it might be more important to get one line  to allow easy parsing  and 
let  the  tool handle the formating.
And otherwise use  pretty.  It is  an  error-log and we did not  want to 
sacrifice the information
from an arbitrary crash report just to make the one liner easy to read. 
(pretty is the easy to read the
on liner is actually not always easy to read even with "strings" printed 
as strings.)

We are considering possible improvements for this sometime in the future.

Regards Ingela Erlang/OTP, Ericsson





More information about the erlang-questions mailing list