You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Yunkai Zhang (JIRA)" <ji...@apache.org> on 2014/02/19 12:47:19 UTC

[jira] [Created] (TS-2576) Add Oct/Hex escape representation into LogFormat

Yunkai Zhang created TS-2576:
--------------------------------

             Summary: Add Oct/Hex escape representation into LogFormat
                 Key: TS-2576
                 URL: https://issues.apache.org/jira/browse/TS-2576
             Project: Traffic Server
          Issue Type: Improvement
          Components: Logging
            Reporter: Yunkai Zhang


By default, we use white space ' ' as delimiter into LogFormat:
{code}
<LogFormat>
  <Name = "Cdn_access_log"/>
  <Format = "%<cqhm> %<cquuc> %<pscl> %<psql> %<crc> %<fsi>"/>
</LogFormat>
{code}

Of course, we could use other characters, such as comma(',') or any other visible character or string.

But we found that, the value of fields may conation the same delimiter characters, it would case hard to extract from log file.

So I develop a patch, it will introduce Oct/Hex escape sequences representation in LogFormat, for example:
{code}
<LogFormat>
  <Name = "Cdn_access_log"/>
  <Format = "%<cqhm>\001\002%<cquuc>\001\002%<pscl>\001\002%<psql>\001\002%<crc>\001\002%<fsi>"/>
</LogFormat>
{code}
In the above example, '\001\002' are two characters: '\001', '\002' in Oct escape sequence representation.

This patch now supports two forms(the same with the format in C lauguage):
* Oct escape sequence:
{code}
'\abc': a,b,c should be one of [0-9], and (a*8^2 + b*8 + c) should less then 255.
{code}
* Hex escape sequence:
{code}
'\xab': a,b should one [0-9, a-f, A-F], and (a*16 + b) should less then 255.
{code}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)