116

I've gone through all the documentation of logback and I can't find anywhere the documentation to configure the encoder's pattern when logging, such as:

<encoder>
  <pattern>%d{HH:mm:ss.SSS} %-4relative %-5level %logger{35} - %msg%n</pattern>
</encoder>

I would like a table (like the one that log4j has) explaining the different options to configure the pattern.

Where is the documentation of the pattern? Maybe they are defined in another project?

Basil Bourque
  • 303,325
  • 100
  • 852
  • 1,154
pakore
  • 11,395
  • 12
  • 43
  • 62

1 Answers1

129

Probably you should take a look at Chapter 6: Layouts...

Basil Bourque
  • 303,325
  • 100
  • 852
  • 1,154
anirvan
  • 4,797
  • 4
  • 32
  • 42
  • 10
    I'm stupid. Sometimes something is in front of your eyes and you simply can't see it. I've went 3 times to that chapter and I didn't see it. Thanks!. – pakore Oct 07 '10 at 11:58
  • 10
    I too did not see it. About a quarter down that long page, in the [Conversion Word table](http://logback.qos.ch/manual/layouts.html#conversionWord) of the [`PatternLayout`](http://logback.qos.ch/manual/layouts.html#ClassicPatternLayout) section. – Basil Bourque Apr 15 '14 at 22:49
  • Ugh I dislike the documentation layout, the top sections always seem unrelated... – rogerdpack Dec 19 '19 at 17:57
  • I don't think the '...' was aimed at you Pakore, more at how buried it is in their page, and how few people actually link to it. – Ninjaxor Apr 30 '21 at 22:12