[ https://issues.apache.org/jira/browse/LOG4J2-2647?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16945442#comment-16945442 ]
ASF subversion and git services commented on LOG4J2-2647: --------------------------------------------------------- Commit dc5b6b912623a68828c31fc58d0dd9a79282e484 in logging-log4j2's branch refs/heads/release-2.x from Matt Sicker [ https://gitbox.apache.org/repos/asf?p=logging-log4j2.git;h=dc5b6b9 ] [LOG4J2-2693] Use @PluginValue value This fixes the @PluginValue annotation handling to use the specified string as the attribute name to look up rather than defaulting to the "value" attribute. This fixes LOG4J2-2647 as well. > 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)