Skip to content

Add more ansi styles to the logging system #49262

@Marco-Sulla

Description

@Marco-Sulla

In log4j 2.x docs, there's a lot of other ansi style currently Spring Boot doesn't support using %clr:

  1. bold
  2. underline
  3. reverse (swaps the background and foreground colors)
  4. bg_* colors (background colors)
  5. multiple style (e.g. {%bold %red})
  6. custom colors (specified with hex code)

Currently, AnsiStyle have bold and underline, and all bg named colors have the same names of already implemented foreground colors.

reverse is particularly interesting IMO used with log levels.

AFAIK, of these styles, logback supports only bold foreground colors.

log4j also allows normal, hidden and blink. I fail to see the usefulness of the first two, while I don't like blink at all. Just adding them for the sake of completeness.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions