httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leonid Antonenkov <>
Subject Fields delimiter in new "full" log format
Date Thu, 16 May 2002 11:50:39 GMT
Hello all!

Leonid Antonenkov wrote:
> I think it will be better to define _standard_ "full" log format

About fields delimiter in new "full" format:

In "combined" log format all fields separated with space character.
Some of fields (for example, %r - first line of request)
may contain space symbol, so such fields enclosed with '"' character.

The problem is in parsing log files:
if there is '"' character in first line of request,
results of parsing will be unpredictable.

In my opinion, the best way to store such data structures
(without changing main concept, without using XML, etc.)
is to store lines separated by 'separator' (tab, for example),
enclosed by 'encloser' ('"', for example)
and escaped with 'escaper' ('\', for example).
But this way needs changing code of Apache and so on.

Not the best, but, I think, better than current solution
is to define long delimiter with rare characters (for example ' |:| ')

Format string will be like this: 
LogFormat "%h |:| %l |:| %u |:| %t |:| %r |:| %>s |:| %b |:| %{Referer}i
|:| %{User-Agent}i" new_combined

Sincerely yours,
  Leonid Antonenkov

ICQ UIN: 23637980

View raw message