[logback-user] ConsoleAppender/FileAppender encoding

Ceki Gülcü ceki at qos.ch
Thu Mar 25 17:12:21 CET 2010


Hello Matthieu,

The encoding property has been renamed as Charset and now is part of the 
encoder. The config file snippet becomes:

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
   <encoder>
     <pattern>%d %t [%-5level] - %-40class{40} - %msg%n</pattern>
     <charset>UTF-8</charset>
   </encoder>
</appender>

HTH,

On 25/03/2010 4:33 PM, Matthieu Guamis wrote:
> Hi,
>
> It seems that element "encoding" is no more recognized in
> Console/FileAppender so maybe I missed something (no more reference in
> documentation) but I did not find what :(
> Here is my (new) configuration (logback 0.9.19)
>
> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
> <encoding>UTF-8</encoding>
> <encoder>
> <pattern>%d %t [%-5level] - %-40class{40} - %msg%n</pattern>
> </encoder>
> </appender>
>
> And the corresponding output at runtime:
>
> [...]
> 15:58:29,127 |-INFO in ch.qos.logback.core.joran.action.AppenderAction -
> About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
> 15:58:29,146 |-INFO in ch.qos.logback.core.joran.action.AppenderAction -
> Naming appender as [STDOUT]
>
> 15:58:29,226 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter at 7:13 -
> no applicable action for [encoding], current pattern is
> [[configuration][appender][encoding]]
>
> 15:58:29,230 |-INFO in
> ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Pushing
> component [encoder] on top of the object stack.
> 15:58:29,403 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction
> - Setting additivity of logger [org.barracudamvc] to true
> 15:58:29,403 |-INFO in ch.qos.logback.classic.joran.action.LevelAction -
> org.barracudamvc level set to WARN
> 15:58:29,403 |-INFO in
> ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender
> named [STDOUT] to Logger[org.barracudamvc]
> [...]
>
> Any suggestion on what could be wrong?
> Thanks
>
> --
> *Matthieu Guamis*
> *Logo Axège <http://www.axege.com/>* 	/Axège//
> 23,rue Saint-Simon
> 63000 Clermont-Ferrand/
>
> Tél: +33 (0)4 63 05 95 40
> Fax: +33 (0)4.73.70.65.29
> Email: matthieu.guamis at axege.com <mailto:matthieu.guamis at axege.com>
>
>
>
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://qos.ch/mailman/listinfo/logback-user



More information about the Logback-user mailing list