How to use a special character (extended ascii, unicode, ...) in a logging pattern when configured through the CLI ?

Solution Verified - Updated -

Issue

  • Unable to use a middle dot (extended ascii) in a logging pattern when configured through the CLI ?
  • Unicode character is showing as a '?'
  • When trying to setup a logging pattern with a middle dot in it, it is replaced by a question mark. This only happens through the CLI. The following command was used to reconfigure the pattern:
/subsystem=logging/pattern-formatter=COLOR-PATTERN:write-attribute(name=pattern, value="Middle Dot >> · <<  %K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n")

You will see that a question mark is shown.

Middle Dot >> ? <<  11:36:13,329 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss EAP 6.4.0.GA (AS 7.5.0.Final-redhat-21) started in 315ms - Started 153 of 191 services (57 services are lazy, passive or on-demand)

However, if we replace the question mark in the standalone.xml with a middle dot again, and it works. :

Middle Dot >> · <<  11:41:45,068 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss EAP 6.4.0.GA (AS 7.5.0.Final-redhat-21) started in 3015ms - Started 153 of 191 services (57 services are lazy, passive or on-demand)

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.