You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Matt Sicker (Jira)" <ji...@apache.org> on 2019/10/06 20:19:00 UTC

[jira] [Work started] (LOG4J2-2647) Validation blocks definition of script in properties configuration

     [ https://issues.apache.org/jira/browse/LOG4J2-2647?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on LOG4J2-2647 started by Matt Sicker.
-------------------------------------------
> Validation blocks definition of script in properties configuration
> ------------------------------------------------------------------
>
>                 Key: LOG4J2-2647
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2647
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Configurators
>    Affects Versions: 2.12.0
>            Reporter: Daniel Skovenborg
>            Assignee: Matt Sicker
>            Priority: Minor
>
> Creating a script in a properties configuration is undocumented but is supported by PropertiesConfigurationBuilder:
> {code:java}
>     private ScriptComponentBuilder createScript(final Properties properties) {
>         final String name = (String) properties.remove("name");
>         final String language = (String) properties.remove("language");
>         final String text = (String) properties.remove("text");
> {code}
> So I should be able to specify the code with the "text" key. However, validation is blocking this feature. I've tried this (script content omitted):
> {code:java}
> script.foo.type=Script
> script.foo.name=foo
> script.foo.language=javascript
> script.foo.text=true
> {code}
> This gives the following errors:
> {quote}Script contains an invalid element or attribute "text"
> No 'scriptText' attribute provided for Script plugin 'uuid'
> {quote}
> Using "scriptText" as key is not accepted either.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)