On 05/05/2011 6:24 PM, moxol wrote:

I have tried to put some UTF-8 characters with File appender but I didn't
succed. It only gives me question marks ?? instead of characters.

How to use UTF-8?

Hello,

You can set the char encoding with the help of the "charset" property of the encoder referenced by your appender. Example:

<appender name="FILE" class="ch.qos.logback.core.FileAppender">
  <file>testFile.log</file>
  <append>true</append>

  <encoder>
    <charset>UTF-8</charset>
    <pattern>%-4r [%t] %-5level %logger{35} - %msg%n</pattern>
  </encoder>
</appender>

HTH,

--
QOS.ch, main sponsor of cal10n, logback and slf4j open source projects, is looking to hire talented software developers. For further details, see http://logback.qos.ch/job.html
_______________________________________________
Logback-user mailing list
[email protected]
http://qos.ch/mailman/listinfo/logback-user

Reply via email to