Repository: trafficserver Updated Branches: refs/heads/master ee48fbb8b -> 8c618e58e
[TS-2364] - Update logging documentation with log slicing feature Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/8c618e58 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/8c618e58 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/8c618e58 Branch: refs/heads/master Commit: 8c618e58ecd37a853769d11dc4023ceb8f78e75e Parents: ee48fbb Author: Sudheer Vinukonda <[email protected]> Authored: Tue Dec 2 17:20:52 2014 +0000 Committer: Sudheer Vinukonda <[email protected]> Committed: Tue Dec 2 17:20:52 2014 +0000 ---------------------------------------------------------------------- doc/admin/event-logging-formats.en.rst | 37 +++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8c618e58/doc/admin/event-logging-formats.en.rst ---------------------------------------------------------------------- diff --git a/doc/admin/event-logging-formats.en.rst b/doc/admin/event-logging-formats.en.rst index 3f56c10..d1fd223 100644 --- a/doc/admin/event-logging-formats.en.rst +++ b/doc/admin/event-logging-formats.en.rst @@ -561,3 +561,40 @@ Netscape Extended-2 Field Symbols ``ss`` ``pfsc`` ``crc`` ``crc`` =================== ============= + +.. _log-field-slicing: + +Log Field Slicing +================= + +It is sometimes desirable to slice a log field to limit the length of a given +log field's output. + +Log Field slicing can be specified as below: + +``%<field[start:end]>`` +``%<{field}container[start:end]>`` + +Omitting the slice notation defaults to the entire log field. + +Slice notation only applies to a log field that is of type string +and can not be applied to ip/timestamp which are converted to +string from integer. + +The below slice specifiers are allowed. + +``[start:end]`` + Log field value from start through end-1 +``[start:]`` + Log field value from start through the rest of the string +``[:end]`` + Log field value from the beginning through end-1 +``[:]`` + Default - entire Log field + +For example, + '%<cqup>' //the whole characters of <cqup>. + '%<cqup>[:]' //the whole characters of <cqup>. + '%<cqup[0:30]>' //the first 30 characters of <cqup>. + '%<cqup[-10:]>' //the last 10 characters of <cqup>. + '%<cqup[:-5]>' //everything except the last 5 characters of <cqup>.
