[logback-dev] [GIT] Logback: the generic, reliable, fast and flexible logging framework. branch, master, updated. v0.9.18-77-gc7af050

Joern Huxhorn jhuxhorn at googlemail.com
Thu Mar 11 15:31:46 CET 2010


On 11.03.2010, at 13:09, added by portage for gitosis-gentoo wrote:

> This is an automated email from the git hooks/post-receive script.  
> It was
> generated because a ref change was pushed to the repository containing
> the project "Logback: the generic, reliable, fast and flexible  
> logging framework.".
>
> The branch, master has been updated
>       via  c7af050b93defa5beb51c3d031ddcf85909719d7 (commit)
>      from  d355c186d801151469afedc107ae35c338468f6d (commit)
>

> diff --git a/logback-core/src/main/java/ch/qos/logback/core/encoder/ 
> LayoutWrappingEncoder.java b/logback-core/src/main/java/ch/qos/ 
> logback/core/encoder/LayoutWrappingEncoder.java
> index 0c3f2bf..32ea60d 100644
> --- a/logback-core/src/main/java/ch/qos/logback/core/encoder/ 
> LayoutWrappingEncoder.java
> +++ b/logback-core/src/main/java/ch/qos/logback/core/encoder/ 
> LayoutWrappingEncoder.java
> @@ -2,6 +2,7 @@ package ch.qos.logback.core.encoder;
>
> import java.io.IOException;
> import java.io.OutputStream;
> +import java.io.UnsupportedEncodingException;
> import java.nio.charset.Charset;
>
> import ch.qos.logback.core.CoreConstants;
> @@ -20,7 +21,6 @@ public class LayoutWrappingEncoder<E> extends  
> EncoderBase<E> {
>    */
>   private Charset charset;
>
> -
>   public Layout<E> getLayout() {
>     return layout;
>   }
> @@ -89,7 +89,12 @@ public class LayoutWrappingEncoder<E> extends  
> EncoderBase<E> {
>     if (charset == null) {
>       return s.getBytes();
>     } else {
> -      return s.getBytes(charset);
> +      try {
> +        return s.getBytes(charset.name());
> +      } catch (UnsupportedEncodingException e) {
> +        throw new IllegalStateException(
> +            "An existing charser cannot possibly be unsupported.");
> +      }
>     }
>   }
>

There's a typo in the impossible exception message. ;)

Also: sorry for introducing this problem. I overlooked that this  
method was added with 1.6.

Cheers,
Joern.



More information about the logback-dev mailing list