[jboss-jira] [JBoss JIRA] (WFCORE-2011) Inconsistency of formatter and named-formatter in console logging handler
ted won (JIRA)
issues at jboss.org
Mon Nov 21 02:25:00 EST 2016
[ https://issues.jboss.org/browse/WFCORE-2011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13325335#comment-13325335 ]
ted won edited comment on WFCORE-2011 at 11/21/16 2:24 AM:
-----------------------------------------------------------
Hi Brian, Thanks for your kind and detailed explanation!
I agree with your second comment and know and understand the features especially on exclusively working between them. I thnk it can be changed as an improvement, not a bug. Any user can get to know it is working with 'named-formatter' first and 'formatter' is working without 'named-formatter' after trying some changing and applying in the configuration. However, It makes user confuse which one is selected and will be working with just looking at the view or without specific knowledge in the situation 'formatter' and 'named-formatter' attributes are alternatives to each other but it's displayed both at the same time in CLI and admin console. It also can't apply "(include-defaults=false)" in the admin console. There is no description for which one will be affected first or some information like a priority. So we got an inquiry for this inconsistency and confusing from a user. In a view of users perspective, they can't understand where the formatter {noformat}"%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"{noformat} is from, in this case, especially when seeing in the admin console HANDLER -> Console page (attachment). They've never defined it. Actually, it's better to display named-formatter's format.
If it is okay, I'll be happy with working for a contribution for this issue and make a PR with the hint you gave me. I really appreciate your hint and asking again. :-)
was (Author: rhn-support-jwon):
Hi Brian, Thanks for your kind and detailed explanation!
I agree with your second comment and know and understand the features especially on exclusively working between them. I thnk it can be changed as an improvement, not a bug. Any user can get to know it is working with 'named-formatter' first and 'formatter' is working without 'named-formatter' after trying some changing and applying in the configuration. However, It makes user confuse which one is selected and will be working with just looking at the view or without specific knowledge in the situation 'formatter' and 'named-formatter' attributes are alternatives to each other but it's displayed both at the same time in CLI and admin console. It also can't apply "(include-defaults=false)" in the admin console. There is no description for which one will be affected first or some information like a priority. So we got an inquiry for this inconsistency and confusing from a user. In a view of users perspective, they can't understand where the formatter "%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n" is from, in this case, especially when seeing in the admin console HANDLER -> Console page (attachment). They've never defined it. Actually, it's better to display named-formatter's format.
If it is okay, I'll be happy with working for a contribution for this issue and make a PR with the hint you gave me. I really appreciate your hint and asking again. :-)
> Inconsistency of formatter and named-formatter in console logging handler
> -------------------------------------------------------------------------
>
> Key: WFCORE-2011
> URL: https://issues.jboss.org/browse/WFCORE-2011
> Project: WildFly Core
> Issue Type: Bug
> Components: Domain Management
> Affects Versions: 3.0.0.Alpha13
> Environment: It is possible to reproduce with all profiles and all modes.
> All WildFly profiles
> All WildFly clustering mode
> * standalone mode
> * domain mode
> Reporter: ted won
> Assignee: Brian Stansberry
> Priority: Minor
> Labels: logging
> Attachments: COLOR-PATTERN.png, CONSOLE-console-handler.png
>
>
> In logging subsystem the default CONSOLE console-handler is defined with COLOR-PATTERN named-formatter.
> And the COLOR-PATTERN named-formatter is defined with: {noformat}"%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"{noformat}
> It is working as it is defined with colors in a console.
> {code:title=standalone.xml}
> ...
> <subsystem xmlns="urn:jboss:domain:logging:3.0">
> <console-handler name="CONSOLE">
> <level name="INFO"/>
> <formatter>
> <named-formatter name="COLOR-PATTERN"/>
> </formatter>
> </console-handler>
> ...
> <formatter name="COLOR-PATTERN">
> <pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/>
> </formatter>
> </subsystem>
> ...
> {code}
> However there is a inconsistency in the CLI and WildFly admin console views.
> In the CLI, CONSOLE formatter is: {noformat}"%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"{noformat} It is wrong and different with the working logging format in a console.
> {code:title=JBoss CLI}
> [standalone at localhost:9990 /] /subsystem=logging/console-handler=CONSOLE:read-resource
> {
> "outcome" => "success",
> "result" => {
> "autoflush" => true,
> "enabled" => true,
> "encoding" => undefined,
> "filter" => undefined,
> "filter-spec" => undefined,
> "formatter" => "%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n",
> "level" => "INFO",
> "name" => "CONSOLE",
> "named-formatter" => "COLOR-PATTERN",
> "target" => "System.out"
> }
> }
> {code}
> It should be fixed like below:
> {code:title=Expected result}
> [standalone at localhost:9990 /] /subsystem=logging/console-handler=CONSOLE:read-resource
> {
> "outcome" => "success",
> "result" => {
> "autoflush" => true,
> "enabled" => true,
> "encoding" => undefined,
> "filter" => undefined,
> "filter-spec" => undefined,
> "formatter" => undefined,
> "level" => "INFO",
> "name" => "CONSOLE",
> "named-formatter" => "COLOR-PATTERN",
> "target" => "System.out"
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the jboss-jira
mailing list