[ 
https://issues.apache.org/jira/browse/LOG4J2-1136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14934178#comment-14934178
 ] 

Gary Gregory commented on LOG4J2-1136:
--------------------------------------

I've done JavaScript in configuration files in other projects, and the first 
thing I did after I got the POC working is add file references to load scripts 
instead of embedding the script in the configuration. This let's you use a 
script language-specific editor instead of an XML editor (or JSON, or YAML). 
This also avoids using CDATA.

For us, this could look like this:

{code:xml}
          <Script name="JavascriptFilter1" language="JavaScript" 
path="c:\foo\bar.js" charset="UTF-8"/>
          <Script name="JavascriptFilter2" language="JavaScript" 
path="file:///C:/foo/bar.js" charset="UTF-8"/>
{code}

> 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]

Reply via email to