[
https://issues.jboss.org/browse/WFCORE-2011?page=com.atlassian.jira.plugi...
]
Brian Stansberry commented on WFCORE-2011:
------------------------------------------
I don't think this is a bug, at least not in terms of CLI use. I haven't thought
about how the console presents the data.
This is the output of read-resource when you don't ask the server to give you default
values for undefined attributes:
{code}
[standalone@embedded console-handler=CONSOLE] :read-resource(include-defaults=false)
{
"outcome" => "success",
"result" => {
"autoflush" => undefined,
"enabled" => undefined,
"encoding" => undefined,
"filter" => undefined,
"filter-spec" => undefined,
"formatter" => undefined,
"level" => "INFO",
"name" => "CONSOLE",
"named-formatter" => "COLOR-PATTERN",
"target" => undefined
}
}
{code}
When you do a simple read-resource you get the default values. That's general
server-wide behavior and isn't going to be modified for this particular case.
The 'formatter' and 'named-formatter' attributes are marked as
alternatives to each other, so the attribute descriptions make clear that the user can
only define one or the other. The one that is defined is the one that takes effect.
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
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: ted won
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@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@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)