Formatting Log Files | apache proxy log
Thissectioncoversthecreationofloggingformats.AllbutafewloggingoutputrelatedsettingsinTrafficServerareperformedinlogging.yaml[1]andconsultingthedocumentationforthatfileisrecommendedinadditiontothissection.Anyconfigurationsorsettingsperformedoutsidethatfilewillbeclearlynoted.DefiningFormatsLoggingformatsinTrafficServeraredefinedbyeditinglogging.yaml[2]andaddingnewformatentriesforeachformatyouwishtodefine.Thesyntaxisfairlysimple:everyformatmustcontainaFormatattribute,whichisthestringdefiningthe...
This section covers the creation of logging formats. All but a few logging output related settings in Traffic Server are performed in logging.yaml[1] and consulting the documentation for that file is recommended in addition to this section. Any configurations or settings performed outside that file will be clearly noted.
Defining FormatsLogging formats in Traffic Server are defined by editing logging.yaml[2] and adding new format entries for each format you wish to define. The syntax is fairly simple: every format must contain a Format attribute, which is the string defining the contents of each line in the log, and may also contain an optional Interval attribute defining the log aggregation interval for any logs which use the format (see Summary Logs[3] for more information). It may also contain an optional escape attribute defining the escape of log fields. Possible values for escape are json or none.
The return value from the format function is the log format object...