Bug 915835
| Summary: | CLI: "pattern" and "replacement" should be required when creating logging filter | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | Petr Kremensky <pkremens> |
| Component: | Logging | Assignee: | James Perkins <jperkins> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.1.0 | CC: | brian.stansberry, chaowan, pkremens, smcgowan |
| Target Milestone: | ER4 | ||
| Target Release: | EAP 6.1.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | Bug | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Need an upstream JIRA. Chao Wang <chaowan> made a comment on jira AS7-6713 patch to check "pattern" and "replacement" values can't be undefined from LoggingWriteAttributeHandler.validateUpdatedModel() James Perkins <jperkins> made a comment on jira AS7-6713 Writing a fix for this and testing various other filters I think I opened Pandora's box :-). I'll suggest for a workaround use the {{filter-spec}} expressions instead. I'll also note, I should probably document those. Chao Wang <chaowan> made a comment on jira AS7-6713 wrt filter-spec expression, I tried to configure something similar, but unsuccessfully as described in https://community.jboss.org/thread/222386 Behaviour described in description is fixed. There is new info message that filter attribute is deprecated and thus should not be used. Closing Pandora's box :). Verified with EAP 6.1 ER4 |
I am able to set filter attribute without "pattern" and "replacement" although they are not nillable. calling: /subsystem=logging/console-handler=CONSOLE:write-attribute(name=filter, value={replace => {"replace-all" => true}}) will create useless filter: "filter" => {"replace" => { "replace-all" => true, "pattern" => "undefined", "replacement" => "undefined" }} "filter-spec" => "substituteAll(\"undefined\",\"undefined\")" only "replace-all" is actually required now: [standalone@localhost:9999 /] /subsystem=logging/console-handler=CONSOLE:update-properties(filter={replace => {"pattern" => "JBAS","replacement" => "SABJ"}}) { "outcome" => "failed", "failure-description" => "JBAS014749: Operation handler failed: null", "rolled-back" => true }