<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="Arial">Thank you for quick reply!<br>
<br>
Setting the property Charset with a string leads to a new error:<br>
17:49:46,884 |-ERROR in
ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Could not
find an appropriate class for property [charset]<br>
<br>
LayoutWrappingEncoder contains method setCharset(Charset charset) so I
tried this config:<br>
<br>
<appender name="STDOUT"
class="ch.qos.logback.core.ConsoleAppender"><br>
<encoder
class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"><br>
<pattern>%d %t [%-5level] - %-40class{40} -
%msg%n</pattern><br>
<charset
class="java.nio.charset.Charset">UTF-8</charset><br>
</encoder><br>
</appender><br>
<br>
But the </font><font face="Arial">java.nio.charset.Charset class does
not allow this king of instantiation</font> since its constructor is
protected.<br>
Using <font face="Arial">Charset.forName("UTF-8") seems the way to do
it but I don't know how to specify it in configuration file dialect :(<br>
Any trick?<br>
<br>
Regards,<br>
</font><font face="Arial"><br>
</font><font size="-1"><font face="Arial"><br>
</font></font>
<div class="moz-signature">
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
<font face="Arial"><b>Matthieu Guamis</b></font><br>
<div class="moz-signature">
<table border="0" cellpadding="0" cellspacing="0" height="62"
width="224">
<tbody>
<tr>
<td valign="middle" align="center"><font face="Arial" size="-1"><b><a
href="http://www.axege.com/"><img alt="Logo Axège"
title="www.axege.com" src="cid:part1.06080009.02070103@axege.com"
border="0" height="49" width="50"></a></b></font></td>
<td valign="middle" align="left"><font color="#5f574f"
face="Arial" size="-1"><i>Axège</i></font><font color="#5f574f"
face="Arial" size="-1"><i><br>
23,rue Saint-Simon<br>
63000 Clermont-Ferrand</i></font></td>
</tr>
</tbody>
</table>
<font face="Arial" size="-1">Tél: +33 (0)4 63 05 95 40<br>
Fax: +33 (0)4.73.70.65.29<br>
Email: <a href="mailto:matthieu.guamis@axege.com"
style="text-decoration: none;">
<font color="#5f574f" face="Arial" size="-1">matthieu.guamis@axege.com</font></a><br>
</font>
</div>
</div>
<br>
Le 25/03/2010 17:12, Ceki Gülcü a écrit :
<blockquote cite="mid:4BAB8B65.7090202@qos.ch" type="cite"><br>
Hello Matthieu,
<br>
<br>
The encoding property has been renamed as Charset and now is part of
the encoder. The config file snippet becomes:
<br>
<br>
<appender name="STDOUT"
class="ch.qos.logback.core.ConsoleAppender">
<br>
<encoder>
<br>
<pattern>%d %t [%-5level] - %-40class{40} -
%msg%n</pattern>
<br>
<charset>UTF-8</charset>
<br>
</encoder>
<br>
</appender>
<br>
<br>
HTH,
<br>
<br>
On 25/03/2010 4:33 PM, Matthieu Guamis wrote:
<br>
<blockquote type="cite">Hi,
<br>
<br>
It seems that element "encoding" is no more recognized in
<br>
Console/FileAppender so maybe I missed something (no more reference in
<br>
documentation) but I did not find what :(
<br>
Here is my (new) configuration (logback 0.9.19)
<br>
<br>
<appender name="STDOUT"
class="ch.qos.logback.core.ConsoleAppender">
<br>
<encoding>UTF-8</encoding>
<br>
<encoder>
<br>
<pattern>%d %t [%-5level] - %-40class{40} -
%msg%n</pattern>
<br>
</encoder>
<br>
</appender>
<br>
<br>
And the corresponding output at runtime:
<br>
<br>
[...]
<br>
15:58:29,127 |-INFO in ch.qos.logback.core.joran.action.AppenderAction
-
<br>
About to instantiate appender of type
[ch.qos.logback.core.ConsoleAppender]
<br>
15:58:29,146 |-INFO in ch.qos.logback.core.joran.action.AppenderAction
-
<br>
Naming appender as [STDOUT]
<br>
<br>
15:58:29,226 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@7:13
-
<br>
no applicable action for [encoding], current pattern is
<br>
[[configuration][appender][encoding]]
<br>
<br>
15:58:29,230 |-INFO in
<br>
ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Pushing
<br>
component [encoder] on top of the object stack.
<br>
15:58:29,403 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction
<br>
- Setting additivity of logger [org.barracudamvc] to true
<br>
15:58:29,403 |-INFO in ch.qos.logback.classic.joran.action.LevelAction
-
<br>
org.barracudamvc level set to WARN
<br>
15:58:29,403 |-INFO in
<br>
ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender
<br>
named [STDOUT] to Logger[org.barracudamvc]
<br>
[...]
<br>
<br>
Any suggestion on what could be wrong?
<br>
Thanks
<br>
<br>
--
<br>
*Matthieu Guamis*
<br>
*Logo Axège <a class="moz-txt-link-rfc2396E" href="http://www.axege.com/"><http://www.axege.com/></a>* /Axège//
<br>
23,rue Saint-Simon
<br>
63000 Clermont-Ferrand/
<br>
<br>
Tél: +33 (0)4 63 05 95 40
<br>
Fax: +33 (0)4.73.70.65.29
<br>
Email: <a class="moz-txt-link-abbreviated" href="mailto:matthieu.guamis@axege.com">matthieu.guamis@axege.com</a>
<a class="moz-txt-link-rfc2396E" href="mailto:matthieu.guamis@axege.com"><mailto:matthieu.guamis@axege.com></a>
<br>
<br>
<br>
<br>
_______________________________________________
<br>
Logback-user mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Logback-user@qos.ch">Logback-user@qos.ch</a>
<br>
<a class="moz-txt-link-freetext" href="http://qos.ch/mailman/listinfo/logback-user">http://qos.ch/mailman/listinfo/logback-user</a>
<br>
</blockquote>
<br>
_______________________________________________
<br>
Logback-user mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Logback-user@qos.ch">Logback-user@qos.ch</a>
<br>
<a class="moz-txt-link-freetext" href="http://qos.ch/mailman/listinfo/logback-user">http://qos.ch/mailman/listinfo/logback-user</a>
<br>
</blockquote>
</body>
</html>