[jboss-jira] [JBoss JIRA] (AS7-5991) It’s impossible to set a custom pattern string for the handler’s formatter via CLI or native configuration API
Radoslav Rangelov (JIRA)
jira-events at lists.jboss.org
Tue Nov 20 09:43:22 EST 2012
[ https://issues.jboss.org/browse/AS7-5991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12735744#comment-12735744 ]
Radoslav Rangelov commented on AS7-5991:
----------------------------------------
My test fix/patch for the issue:
Class org.jboss.as.logging.handlers.AbstractLogHandlerWriteAttributeHandler (row 92):
…
} else if (FORMATTER.getName().equals(attributeName)) {
//FormatterSpec.fromModelNode(context, resolvedValue).apply(handler); // original code
FormatterSpec.fromValue(resolvedValue.asString()).apply(handler); // new fixed code
…
Class org.jboss.as.logging.handlers.FormatterSpec:
…
// new factory getter
public static FormatterSpec fromValue(final String formatter) {
return new PatternFormatterSpec(formatter);
}
…
The issue is caused by second attempt to resolve the formatter from already resolved value. That’s why the default value is used always.
> It’s impossible to set a custom pattern string for the handler’s formatter via CLI or native configuration API
> --------------------------------------------------------------------------------------------------------------
>
> Key: AS7-5991
> URL: https://issues.jboss.org/browse/AS7-5991
> Project: Application Server 7
> Issue Type: Bug
> Components: CLI, Logging
> Affects Versions: 7.1.2.Final (EAP)
> Reporter: Radoslav Rangelov
> Assignee: Alexey Loubyansky
> Fix For: 7.1.1.Final
>
>
> It’s impossible to set a custom pattern string for the handler’s formatter via CLI or native configuration API. The default value for the pattern is always used - not the specified one. The stored configuration in domain.xml is ok but runtime setting of the pattern doesn’t work. I need to restart JBoss to apply the changes.
> The configuration in domain.xml file works fine during startup:
> <formatter>
> <pattern-formatter pattern="custom pattern string"/>
> </formatter>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list