[jboss-jira] [JBoss JIRA] (WFCORE-2011) Inconsistency of formatter and named-formatter in console logging handler

ted won (JIRA) issues at jboss.org
Fri Nov 18 04:12:00 EST 2016


ted won created WFCORE-2011:
-------------------------------

             Summary: 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: Logging
    Affects Versions: 3.0.0.Alpha13
            Reporter: ted won
            Assignee: ted won
            Priority: Minor
         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.

{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.
{noformat}
In the CLI, CONSOLE formatter is "%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n". It is different with the working logging format.
{noformat}

{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 is possible to reproduce with all profiles and all modes.
* standalone.xml
* standalone-full-ha.xml
* standalone mode
* domain mode



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list