ppkarwasz opened a new issue, #4344:
URL: https://github.com/apache/logging-log4j2/issues/4344

   ## Description
   
   `%m{html}` (and `%msg{html}`, `%message{html}`) silently drops the log 
message.
   
   `MessagePatternConverter` maps the `html` option to `HtmlTextRenderer`,
   but both `render` methods of `HtmlTextRenderer` are empty stubs (`// TODO 
Auto-generated method stub`),
   so nothing is appended to the output.
   The option is not documented in the Pattern Layout reference (only 
`{lookups}` and `{ansi}` are).
   
   Proposal, either:
   
   1. **remove** the `html` option (and `HtmlTextRenderer`), reporting an 
unknown option through the status logger, or
   2. **implement** it, HTML-escaping the message (e.g. with 
`StringBuilders.escapeXml`, as `HtmlLayout` does).
   
   Since the option never worked and is undocumented, removing it seems the 
simplest choice.
   
   ## Configuration
   
   **Version:** 2.26.1 (and `2.x` at `d631e82`)
   
   **Operating system:** any
   
   **JDK:** any
   
   ## Logs
   
   None: the message is dropped without any status logger output.
   
   ## Reproduction
   
   ```xml
   <Console name="CONSOLE">
     <PatternLayout pattern="[%p] %m{html}%n"/>
   </Console>
   ```
   
   `logger.info("Hello")` prints `[INFO] ` instead of `[INFO] Hello`.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to