[
https://issues.apache.org/jira/browse/TS-4548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15400307#comment-15400307
]
James Peach commented on TS-4548:
---------------------------------
I wasn't planning on keeping a collection of log objects. Creating a log object
would implicitly add it to the {{LogConfig}} collection. The Lua state will
only be used to evaluate the configuration (at least in this iteration.
We will need some API constants, though the mode is handled by the log object
factory functions, {{log.pipe()}}, {{log.ascii()}}, {{log.binary()}}.
I thought a bit about the condition strings for filters. I don't think that the
suggestion above is sufficiently better to make it worth adding. In the longer
term though, it would be interesting to implement filters directly in Lua as
functions that can be evaluated in terms of log access fields.
So far I haven't been able to come up with a syntax that is a significant
improvement over the logging format strings, so I'm planning to have a fairly
direct mapping from Lua to the various log subsystem objects. I'll push a
branch for review as soon as I have the very basics working.
> Convert custom log config file to Lua
> -------------------------------------
>
> Key: TS-4548
> URL: https://issues.apache.org/jira/browse/TS-4548
> Project: Traffic Server
> Issue Type: Improvement
> Components: Logging, Lua
> Reporter: James Peach
> Assignee: James Peach
> Fix For: 7.0.0
>
>
> Custom logs {{logs_xml.config}} is a good candidate to convert to Lua
> bindings. I'm thinking that we bind fairly directly to the internal logging
> objects so that conceptually it is the same but instead of using XML to
> construct objects, you use Lua. We would just construct Lua states on the fly
> to evaluate the file.
> This is the last usage of XML and would let us nuke {{proxy/shared/InkXml.*}}
> as well as our dependencies on expat+libxml2.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)