[
https://issues.apache.org/jira/browse/LOG4J2-1136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14934522#comment-14934522
]
Ralph Goers edited comment on LOG4J2-1136 at 9/29/15 2:45 AM:
--------------------------------------------------------------
Yes, I anticipated something like this for phase 2. Like you, my first
instinct was to add the path to the existing script element. But I have no
issue with using ScriptFile instead. However, I really don't see much gain in
having both of them extend AbstractScript. They are just both containers of
parameters. As you pointed out, ScriptFile really doesn't need the language
attribute (although it might be good to have so that the ScriptManager doesn't
have to maintain a list of file extensions) so the only attribute they have in
common is the name attribute, and even there it isn't required for a ScriptFile
as the path attribute could serve the same purpose.
I didn't add it right away because some discussion is required regarding how to
check for and handle updates to the file. Would it happen as part of chacking
the configuration file for changes? If the script file changes does the who
configuration need to be reconstructed? I can't see implementing this without
the ability to dynamically check for changes, but I would prefer to do it using
a timer task, and that hasn't been implemented yet.
was (Author: [email protected]):
Yes, I anticipated something like this for phase 2. Like you, my first
instinct was to add the path to the existing script element. But I have no
issue with using ScriptFile instead.
I didn't add it right away because some discussion is required regarding how to
check for and handle updates to the file. Would it happen as part of chacking
the configuration file for changes? If the script file changes does the who
configuration need to be reconstructed? I can't see implementing this without
the ability to dynamically check for changes, but I would prefer to do it using
a timer task, and that hasn't been implemented yet.
> Add support for JSR 223 scripts in filters and the PatternSelector.
> -------------------------------------------------------------------
>
> Key: LOG4J2-1136
> URL: https://issues.apache.org/jira/browse/LOG4J2-1136
> Project: Log4j 2
> Issue Type: New Feature
> Components: Filters, Layouts
> Affects Versions: 2.4
> Reporter: Ralph Goers
> Assignee: Ralph Goers
> Fix For: 2.4.1
>
>
> Sometimes more flexibility is required in filtering and in selecting a
> pattern for the PatternLayout. This enhancement provides support for JSR 223
> scripts.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]